Advertisement
vasil_k_k

Modified string

Jun 13th, 2023
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. some_text = "Sof*)&(t Un%^&^%i is((. t&(he best!!!"
  2.  
  3. split_text = some_text.lower().split()
  4.  
  5. for  word in split_text:
  6.     modified_word = "".join([i for i in word if ord(i) in range(97, 123)])
  7.  
  8.     print(modified_word, end=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement