01 2020 档案

摘要:The "First-Class object" in Python: Created at runtime Assigned to a variable or element in a data structure Pass as an augument to a function Return 阅读全文
posted @ 2020-01-31 01:16 neozheng 阅读(149) 评论(0) 推荐(0) 编辑
摘要:1. Handling missing keys with setdefault import sys import re WORD_RE = re.compile('\w+') index = {} print(sys.argv) # Example 3-2 with open(sys.argv[ 阅读全文
posted @ 2020-01-12 00:52 neozheng 阅读(173) 评论(0) 推荐(0) 编辑
摘要:1. Managing Ordered Sequences with bisect The bisect module offers two main functions bisect and insort that use the binary serach algorithm to quickl 阅读全文
posted @ 2020-01-05 01:16 neozheng 阅读(217) 评论(0) 推荐(0) 编辑
摘要:1. Listcomps (List comprehensions) do everything the map and filter functions do. (map 函数和 filter函数能做的,列表生成式都可以做) 列表生成式和 map, filter 函数运行时间的比较示例: impo 阅读全文
posted @ 2020-01-01 13:24 neozheng 阅读(225) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示