Computer Science, asked by sajeevshowkath, 6 months ago

write a program to input a list of N number and copy all even numbers to list E in Python
write aprogram to input a list of N nnumbers and copy all even numbers to lost E in Python

Answers

Answered by pari2008chitra61
0

Explanation:

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.

Similar questions