摘要:
xxx 三元表达式 name="alex" res="SB" if name == "alex" else "shuai" print(res) SB 列表生成式 语法 [expression for item1 in iterable1 if condition1 for item2 in ite 阅读全文
摘要:
生成器 from collections import Iterator def test(): print("one") yield 1 print("two") yield 2 print("three") yield 3 obj = test() res = next(obj) print(r 阅读全文