摘要:
1.dict:pop(),get(),in,{} >>> dicttest = {'marry':34,'jucy':56} --初始化>>> dicttest{'jucy': 56, 'marry': 34}>>> dicttest['marry']=66 --替换>>> dicttest{'ju 阅读全文
posted @ 2018-04-08 15:24
富0代
阅读(151)
评论(0)
推荐(0)
摘要:
for while 、 break:退出循环 continue:退出本次循环 例子 for i range(0,101,2): print(i) while n<=100: if (n>10): break prin t(i) n = n + 1 print ('end') 小结 循环是让计算机做重 阅读全文
posted @ 2018-04-08 14:56
富0代
阅读(166)
评论(0)
推荐(0)
摘要:
1.if语句 if <条件判断1>: <执行1> elif <条件判断2>: <执行2> ..... else: <执行> 例子: 阅读全文
posted @ 2018-04-08 14:50
富0代
阅读(150)
评论(0)
推荐(0)
摘要:
1.list的定义,插入insert,append,按位置索引。 >>> name = ['Macal','lily','lucy','bob'] --初始化>>> name['Macal', 'lily', 'lucy', 'bob']>>> name.insert(1,'jazz') --在位置 阅读全文
posted @ 2018-04-08 14:18
富0代
阅读(104)
评论(0)
推荐(0)

浙公网安备 33010602011771号