摘要: # 一、base64 ```python import base64 # 编码 s1 = 'hello' result = base64.b64encode(s1.encode()) # 只能对bytes类型编码,结果为bytes类型 print(result.decode()) # 解码为字符串 阅读全文
posted @ 2023-06-21 17:56 #缘起 阅读(32) 评论(0) 推荐(0) 编辑
摘要: # 一、多线程 ### 示例代码1:简单多线程 ```python import time import threading def foo(t): print("foo 开始") time.sleep(t) print("foo 结束") start = time.time() t_list = 阅读全文
posted @ 2023-06-21 17:28 #缘起 阅读(60) 评论(0) 推荐(0) 编辑