Python基础
Sicilly_琬姗
这个作者很懒,什么都没留下…
展开
-
Python基础02-序列及通用操作
# 序列分类:可变序列List 不可变序列tuple str # 判断值是否属于序列 lst=[1,2,3,4,5,6] a,b,c=1,2.0,'hello' print(a in lst) print(b in lst) print(c not in lst) True True True # 序列的链接与重复 #链接 lst1 = [1,2,3] lst2 = ['a','b'] pr...原创 2019-10-13 00:21:10 · 401 阅读 · 0 评论 -
Python基础01-变量及数据类型
#整形int 浮点型float x1=10 x2=10.0 print(x1,x2) 10 10.0 print(type(x1),type(x2)) <class 'int'> <class 'float'> #字符串String x3='hello world' x4="hehe" x5='''a b c ''' print(x3,x4,x5) hello w...原创 2019-10-13 00:19:58 · 128 阅读 · 0 评论