f=open('A Defence of Virginia.txt',mode='r',encoding='utf-8') T=f.read() f.close() replacelist=['.' , '?' , '!' , ':' , ';' , '"' , "'" ,',','(',')','\ufeffPREFACE'] for c in replacelist: T=T.replace(c,' ') print(T) bl= T.split () print(bl)