摘要: day 07 01.元祖内置方法 1. 作用;被写死的列表 2. 定义方式;tuple (x,x,x,x,x) 一经定义就不可更改 如果元祖只有一个元素,要加逗号, 元祖一定要有逗号 占用内存小 3. 使用方法; tup=(1,2,3,4) 1. 索引取值 2. 索引切片 3. for循环 4. 成 阅读全文
posted @ 2019-09-16 21:24 🍞面包🍞 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 定义变量 核心代码if判断 python age_inp = input('请输入你的年龄') if not age_inp.isdigit(): print(f'你的年龄是{age_inp}吗')/ age_inp_int=int(age_inp) if age_inp_int age: prin 阅读全文
posted @ 2019-09-16 20:06 🍞面包🍞 阅读(91) 评论(0) 推荐(0) 编辑