Guest User

Untitled

a guest
Feb 29th, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. import re
  2.  
  3. with open('words.txt', 'r') as words_list:
  4.     list4 = words_list.read()
  5. new_list = re.findall(r"\s\w\w\w\w\w\s", list4)
  6.  
  7. with open('words.txt', 'w') as new_words_list:
  8.     new_list = ''.join(new_list)
  9.     new_words_list.write(new_list)
Advertisement
Add Comment
Please, Sign In to add comment