01 2020 档案

摘要:1 最简单的使用演示: def simple_coroutine(): print('-> coroutine started') x = yield print('-> coroutine received:', x) my_coro = simple_coroutine() my_coro Out[64]: In [65]:next(my_coro) -> coro... 阅读全文
posted @ 2020-01-31 20:26 绿色的麦田 阅读(254) 评论(0) 推荐(0) 编辑
摘要:一、复习: 条件循环:while i = 3 while i > 0: print(i) i –= 1 arr = [2, 3, 5, 7, 9]while len(arr) > 0: num = arr[0] arr.remove(num) print(arr) 选择排序: [3, 10, 2, 7, 16] 1、找到最小值get_min() def ge... 阅读全文
posted @ 2020-01-18 11:58 绿色的麦田 阅读(249) 评论(0) 推荐(0) 编辑
摘要:一、复习:arr = [2, 7, 3, 5] 1 append(1), arr = [2, 7, 3, 5, 1] 2 remove(7), arr = [2, 3, 5, 1] 3 [1:3] 分片, brr = [3, 5] 二、 选择排序 [3, 10, 2, 7, 16] 第1次:[3, 10, 2, 7, 16]找出2, 放入新数组中[2] 第2次:[3, 10, 7, 16]找出3... 阅读全文
posted @ 2020-01-11 23:27 绿色的麦田 阅读(252) 评论(0) 推荐(0) 编辑