6.7 列表的判断和遍历
作者:互联网
# for in
# not in
# in
列表的判断 in 和 not in lst=[10,56,98,100] print(10 in lst) #10是在列表里吗 print(10 not in lst) #10不在列表里吗 #列表的遍历 for item in lst: print(item)
E:\PycharmProjects\pythonProject\venv\Scripts\python.exe E:/PycharmProjects/pythonProject/demon1/demo3.py True False 10 56 98 100 进程已结束,退出代码0
标签:10,遍历,pythonProject,列表,6.7,lst,PycharmProjects,print 来源: https://www.cnblogs.com/988MQ/p/16632558.html