Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_text = input("Enter a word: ")
- input_list = []
- for item in input_text:
- try:
- test = int(item)
- if test > 5:
- continue
- except ValueError:
- pass
- if item == " ":
- continue
- input_list.append(item)
- print(input_list)
Add Comment
Please, Sign In to add comment