列表推导式:
例:用列表推导式生成100内的大于20的偶数
#Use the list to derive an even number greter than 20 in 100print([x for x in range(0,100) if x % 2 ==0 and x >20])
python
原文:https://www.cnblogs.com/iqingchun/p/8643312.html