【基本运算】python数据的基本运算

1、算数运算:

2、比较运算:

3、赋值运算:

4、逻辑运算:

5、成员运算:

成员运算:

strr="hellow word"       #粒度小
ret="word" in strr
print(ret) #输出结果为True 

#集合
li=['hellow','hi','good']  #粒度大
res="hi" in li
print(res)#输出结果为True

 

posted @ 2017-05-31 11:49  丰study  阅读(102)  评论(0)    收藏  举报