In this program, you'll learn to find the numbers divisible by another number and display it.

To understand this example, you should have the knowledge of following Python programming topics:

In the program below, we have used anonymous (lambda) function inside the `filter()`

built-in function to find all the numbers divisible by 13 in the list.

# Python Program to find numbers divisible by thirteen from a list using anonymous function # 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)

**Output**

Numbers divisible by 13 are [65, 39, 221]

It takes a lot of effort and cost to maintain Programiz. We would be grateful if you support us by either:

**Disabling AdBlock on Programiz. We do not use intrusive ads.**

or

Donate on Paypal
By using Programiz, you agree to use cookies as stated in our Privacy policy Continue