摘要: alist=[2,5,32,34,11,44,65,113] print(alist[::])##取所有alist [2, 5, 32, 34, 11, 44, 65, 113] print(alist[::-1])##alist倒序 [113, 65, 44, 11, 34, 32, 5, 2] 阅读全文
posted @ 2024-01-17 15:15 howhy 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-01-17 13:44 howhy 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import contextlib class MyWith: def __enter__(self): print('enter') return self def doThing(self): print('do.....') def __exit__(self, exc_type, exc_v 阅读全文
posted @ 2024-01-17 12:01 howhy 阅读(1) 评论(0) 推荐(0) 编辑