Good morning!
I have a problem exporting the information that my process is generating. Currently I copy everything that is in my print and paste it into a txt file, but I would like to take this manual process from my project.
I wanted to know if I could directly insert the generated values into a .txt on my desktop for example. In case I called it in the test.txt code
Code:
f = open(r"C:\Users\guilgig\Desktop\test.txt", "w")
with open(r'C:\Users\guilgig\Desktop\Respostas.txt') as stream:
for line in stream:
for word in ['(ANUIDADE',
'alta,,anuidade',
'ANUID',
'ANUIDA',
'ANUIDAD',
'ANUIDADE',
'ANUIDADE)',
'anuidade,',
'anuidade,vcs',
'anuidade.',
'ANUIDADES',
'ANUIDADR6',
'POUCOS(EMPRESARIOS']:
if word.lower() in line.lower():
print(line.strip(), '¬', word)
break
This code helped me create thanks too!