摘要: # enumerate读取文件import enumfor index, line in enumerate(open('C:\\Users\\CTO\\Desktop\\spider\\douban.py', 'rb')): # 读取douban.py print(index, line) # 输出结果37 b'\r\n' 38 b'\r\n' 39 b"if __name__ == ... 阅读全文
posted @ 2019-03-15 20:18 菜鸡2018 阅读(5091) 评论(0) 推荐(0) 编辑
摘要: 最近在复习Python, 好些不明白, 看到博主的文章试着练习了一下 https://www.cnblogs.com/cookie1026/p/6937231.html 第一题: 请使在3秒内计算出一组的数据,偶数在奇数前(注意不使用for while等循环的方法) data = [1, 2, 3, 阅读全文
posted @ 2019-03-15 19:38 菜鸡2018 阅读(128) 评论(0) 推荐(0) 编辑