+ 1

Hello guys. What are the other ways of printing out even numbers in python?

https://code.sololearn.com/ce34u2bLQS5j/?ref=app

21st Dec 2020, 2:29 PM
Mas'ud Saleh
Mas'ud Saleh - avatar
2 ответов
+ 3
even = [i for i in range(0,11,2)] print(even)
21st Dec 2020, 3:08 PM
visph
visph - avatar
0
even_list = [] for num in range (0, 11): if num % 2 == 0: even_list.append(num) print(even_list)
21st Dec 2020, 6:33 PM
Husain Al Abbood
Husain Al Abbood - avatar