Python/basics.py

4 lines
136 B
Python
Raw Normal View History

2020-01-31 12:07:01 +00:00
def numbers_only(jumbles):
return([jumble for jumble in jumbles if type(jumble) == int])
2020-01-29 13:54:51 +00:00
2020-01-31 12:07:01 +00:00
print(numbers_only(["Hello", 1, 3, "Ok"]))