find even numbers in an array
Answers
Answered by
3
Even Numbers:
2
6
2
Odd Numbers:
1
5
3
hope it helps you
Answered by
10
nums = [int(n) for n in input("enter nums: ").split()]
even_nums = [n for n in nums if n % 2 == 0]
print(f"even nums: {even_nums}")
Similar questions