Geocrack

string_list

Jun 30th, 2022 (edited)
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. input_text = input("Enter a word: ")
  2. input_list = []
  3.  
  4. for item in input_text:
  5.     try:
  6.         test = int(item)
  7.         if test > 5:
  8.             continue
  9.     except ValueError:
  10.         pass
  11.  
  12.     if item == " ":
  13.         continue
  14.  
  15.     input_list.append(item)
  16.  
  17. print(input_list)
Add Comment
Please, Sign In to add comment