摘要: 在同时需要用到index和value值的时候可以用到enumerate,参数为可遍历的变量,如字符串,列表等,返回enumerate类。例:import strings = string.ascii_lowercasee = enumerate(s)print sprint list(e)输出结果为... 阅读全文
posted @ 2012-12-27 10:53 豆子在coding 阅读(386) 评论(0) 推荐(0) 编辑