sajad torkamani
nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

even_nums = filter(lambda x: x % 2 == 0, nums)
odd_nums = filter(lambda x: x % 2 == 1, nums)

print(list(even_nums))
print(list(odd_nums))
Tagged: Python

Leave a comment

Your email address will not be published. Required fields are marked *