Computer Science, asked by benifa, 1 month ago

write a python program to print even numbers ​

Answers

Answered by Anonymous
1

Answer:

Python program to print even numbers in a list

Approach 1 − Using enhanced for loop. Example. list1 = [11,23,45,23,64,22,11,24] # iteration for num in list1: # check if num % 2 == 0: print(num, end = " ") ...

Approach 2 − Using filter & lambda function. Example. list1 = [11,23,45,23,64,22,11,24] # lambda exp. ...

Approach 3 − Using list comprehension. Example.

27-Sep-2019

Answered by littlemissangel
7

Python program to print even numbers in a list

Approach 1 − Using enhanced for loop. Example. list1 = [11,23,45,23,64,22,11,24] # iteration for num in list1: # check if num % 2 == 0: print(num, end = " ") ...

Approach 2 − Using filter & lambda function. Example. list1 = [11,23,45,23,64,22,11,24] # lambda exp. ...

Approach 3 − Using list comprehension. Example.

hope it helps you

Similar questions