编程语言
首页 > 编程语言> > Python 内置函数 公共方法

Python 内置函数 公共方法

作者:互联网

for 变量 in 集合:
    
    循环体代码
else:
    没有通过 break 退出循环,循环结束后,会执行的代码

 

 

# 意思是 a 是不是不在hello里面
temp = "a" not in "hello"
print(temp)

# 意思是 a 是不是在hello里面
temp2 = "a" in "hello"
print(temp2)

 

标签:内置,函数,temp,Python,代码,temp2,循环体,print,hello
来源: https://www.cnblogs.com/dazahui/p/14851841.html