Advertisement
RapidR3D

Pull INTEGERS

Mar 14th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1.  
  2. def filter_list(l):
  3.     numbers = [int(l) for l in str.split(l) if l.isdigit()]
  4.     print(numbers)
  5.     string = ' '.join(str(e) for e in numbers)
  6.     return string
  7.     #return a new list with the strings filtered out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement