摘要:
#列表创建1 a=['李刚','李白','王维','苏轼','李商隐','苏洵','王安石','司马光'] #列表创建2 b=list(['李刚','李白','王维','苏轼','李商隐','苏洵','王安石','司马光']) d=[[1,2,3],[4,5,6]] print(d[0][1]) # 阅读全文
摘要:
for i in range(1,10): print("loop",i) for i in range(1,100,2): #步长为2 print("loop",i); for i in range(1,100,2): print(i) if i==49: break elif i==41: co 阅读全文
摘要:
#格式化字符串 msg = "Name:%s Age:%d" %("李白",25) print(msg) 阅读全文