Showing posts with label Python program to find numbers divisible by another number.. Show all posts
Showing posts with label Python program to find numbers divisible by another number.. Show all posts

Friday, November 15, 2019

Python program to find numbers divisible by another number.

# Take a list of numbers
my_list = [12, 65, 54, 39, 102, 339, 221,]
# use anonymous function to filter
result = list(filter(lambda x: (x % 13 == 0), my_list))
# display the result
print("Numbers divisible by 13 are",result)