python判断一个字符是否在一个字符串中

python 里使用 if  …… in  判断 某个字符是否存在于字符串中

str = "字符串"
a = ""
if a in str:
    print(111)

猜你喜欢

转载自www.cnblogs.com/luguankun/p/11846401.html