Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- def number_devider(inp):
- list_A = []
- list_B = []
- for i in inp.split():
- match = re.match(r"\d+$", i)
- if match:
- list_B.append(int(i))
- else:
- list_A.append(i)
- return list_B, list_A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement