I have a python script that takes words from a ".txt" file through the open method and puts them in a list. However, if the word in the text file has an accent, how long it has been passed to the list in python the accent becomes "Äe" for example. I would like to know how I can prevent this problem from happening.
File txt
Até!
Tchau!
Nunca é um adeus!
Fui!
Python strand
chats = open('dialogo/'+ arquivos, 'r').readlines()
When I give print()
to the chat list, accent characters come unconfigured from the txt file .