+ 1
Hello guys. What are the other ways of printing out even numbers in python?
2 ответов
+ 3
even = [i for i in range(0,11,2)]
print(even)
0
even_list = []
for num in range (0, 11):
if num % 2 == 0:
even_list.append(num)
print(even_list)