Advertisement
Guest User

Untitled

a guest
May 10th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import re
  2.  
  3. def number_devider(inp):
  4.     list_A = []
  5.     list_B = []
  6.     for i in inp.split():
  7.         match = re.match(r"\d+$", i)
  8.         if match:
  9.             list_B.append(int(i))
  10.         else:
  11.             list_A.append(i)
  12.  
  13.     return list_B, list_A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement