I'm developing a cod to automate tables. I'm still at the beginning of what I want to do. Anyway, the cod it creates has to be played in a text file. However, some special characters it cannot read
Ex: ...value='S�O PAULO (CGH)';...
try:
file = open('codigo.txt', 'w')
file.writelines(cod)
except FileNotFoundError:
file = open('codigo.txt', 'w')
file.writelines(cod)
file.close()
Is there a way to fix it?