Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data = 'z342512b?333~h123>n<724BB400*a'
- temp_str = ""
- output = []
- for char in data:
- if char.isnumeric():
- temp_str += char
- if len(temp_str) == 3:
- output.append(int(temp_str))
- temp_str = ""
- output.sort()
- print(output)
Advertisement
Add Comment
Please, Sign In to add comment