摘要: enumerate()是python的内置函数 enumerate在字典上是枚举、列举的意思 对于一个可迭代的(iterable)/可遍历的对象(如列表、字符串),enumerate将其组成一个索引序列,利用它可以同时获得索引和值 enumerate多用于在for循环中得到计数. 如果对一个列表,既 阅读全文
posted @ 2017-06-29 14:15 鱼非鱼123 阅读(329) 评论(0) 推荐(0) 编辑
摘要: print("\033[35m Hello,world! \033[0m") print("\033[45m Hello,world! \033[0m") 高亮显示、下划线、反白显示 print("\033[31m Hello,world! \033[0m") print("\033[1;31m H 阅读全文
posted @ 2017-06-29 13:50 鱼非鱼123 阅读(1515) 评论(0) 推荐(0) 编辑