随笔分类 - 《Python让繁琐工作自动化》读书笔记
摘要:def triangles(): prev_line = [1] while True: yield prev_line result = [1] if len(prev_line) == 1: result.append(1) if len(prev_line) > 1: for i in ran
阅读全文
摘要:import webbrowser, sys, pyperclipif len(sys.argv) > 1: address = ' '.join(sys.argv[1:]) #webbrowser.open('http://m')else: address = pyperclip.paste()#
阅读全文
摘要:\d 表示一位数字字符 \d{3} 表示3个数字字符 匹配电话比如400-400-1118 import re phone_number = re.compile(r'\d{3}-\d{3}-\d{4}') mo = phone_number.search(r'for a number is 400
阅读全文
摘要:PASSWORDS = {'email':'asdc3c145daf54gsfdg1re', 'blog': '23dfsdgfdssfdv', 'luggage': 'asdasdf1243weaf4'}import sys,pyperclipif len(sys.argv) < 2: print
阅读全文
浙公网安备 33010602011771号