摘要: 一、字典 1.数据类型划分:可变数据类型和不可变数据类型。 不可变数据类型:元组,布尔值,数字,str(字符串,对str进行任何操作都是形成一个新的str),又叫可哈希。 可变数据类型:列表,字典,集合。不可哈希。 字典的key:必须是不可变数据类型,可哈希。 字典的value:任意数据类型。 字典 阅读全文
posted @ 2018-11-27 21:38 李然然 阅读(138) 评论(0) 推荐(0)
摘要: 1总结 day03 capitalize()首字母大写 upper() lower() title() swapcase() startswith() endswith() split() strip() lstrip() rstrip() find() index() isdigit() isal 阅读全文
posted @ 2018-11-27 20:40 李然然 阅读(156) 评论(0) 推荐(0)
摘要: 一、 今日内容 1.什么数据类型 int:1,2,3用于计算。 bool:True,False,用户判断。 str:存储少量数据,进行操作。 list:储存大量的数据。 元组(tuple):只读列表,不可修改。 字典(dict):{"name" : "云姐", "age" : 16} ,{"云姐": 阅读全文
posted @ 2018-11-27 11:43 李然然 阅读(220) 评论(0) 推荐(0)
摘要: 一.format 1.格式化输出 %占位符,s字符串,d数字 2.补充while else 当while被break打断,就不会执行else的结果。 1 count = 0 2 while count <=5: 3 count += 1 4 if count==3: 5 pass 6 print(" 阅读全文
posted @ 2018-11-27 10:21 李然然 阅读(255) 评论(0) 推荐(0)