用列表推导式,生成一个包含数字1-20的列表,并将该列表中的奇数删除后输出
b = [x for x in (i for i in range(1,21)) if x % 2 == 0] print(b)