Skip to content

Commit 25ce734

Browse files
Create PythonProgramtoFindNumbersDivisiblebyAnotherNumber
1 parent cde0cb0 commit 25ce734

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Take a list of numbers
2+
my_list = [12, 65, 54, 39, 102, 339, 221,]
3+
4+
# use anonymous function to filter
5+
result = list(filter(lambda x: (x % 13 == 0), my_list))
6+
7+
# display the result
8+
print("Numbers divisible by 13 are",result)

0 commit comments

Comments
 (0)