Good evening! I'm having trouble recovering .txt files with python for popular lists or dictionaries, the problem is that these files do not come with uft-8 formatting. example txt content: what is today's date? (here comes a separating tab) askdate
Python code that reads the file:
lines = open("cmds.txt", "r").readlines()
#adicionando os comandos no dicionário
for line in lines:
line = line.replace('\n', '')#removendo os espaços
parts = line.split("\t") #separação por tab
dict_cmds.update({parts[0] : parts[1]})
This will populate a dictionary and if I print the dictionary then it will not recognize the "is".