摘要: 1.为什么需要列表 a=10 #变量存储的是一个对象的引用 lst=['hello','world',98] print(id(lst)) print(type(lst)) print(lst) 2.列表的创建 '''创建列表的第一种方式,使用[]''' lst =['hello','world', 阅读全文
posted @ 2021-11-28 23:22 从精通到陌生 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 1.pass语句 answer=input('您是会员吗?y/n:') #判断是否是会员 if answer=='y': pass else: pass 2.range()函数用法 #range()的三种创建方式 '''第一种创建方式,只有一个参数(小括号中只给了一个数)''' r=range(10 阅读全文
posted @ 2021-11-28 12:45 从精通到陌生 阅读(59) 评论(0) 推荐(0) 编辑