摘要:
xxx 三元表达式 name="alex" res="SB" if name == "alex" else "shuai" print(res) SB 列表生成式 语法 [expression for item1 in iterable1 if condition1 for item2 in ite 阅读全文
posted @ 2017-08-06 16:43
golangav
阅读(724)
评论(0)
推荐(0)
摘要:
生成器 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 阅读全文
posted @ 2017-08-06 11:46
golangav
阅读(339)
评论(0)
推荐(0)
浙公网安备 33010602011771号