-3
Good Afternoon,
I’m very new to Python (2 months) and this is my first post here! I’m creating a script that helps me read two files:
-- 1 file with 51 lines (each line has a different TSAT113806)
-- File 2 with 58 lines ( each line has a TSAT113806 equal to file 1 and 7 different)
What I want to do is create a script that tells me:
- what numbers are repeated in file 1 and 2
- save those numbers to a file 3.
I made this code, but it’s not working, you can help me?
import os
def NovoDoc():
with open('Pedentes.csv', 'r') as pendente:
arq1: int = pendente.readlines()
with open('Cancelados.csv' , 'r') as cancelamentos:
arq2: int = cancelamentos.readlines()
if arq1 == arq2:
with open(os.path.join('resultado.csv', 'w')) as res:
r: int = res.write(arq1)
else:
print('Erro')
vc is halfway through, the most attention-grabbing error is 'arq1: int =', it should be 'arq1=', without the colon and int
– Elton Nunes
Hello @Eltonnunes, thanks for the tip.. What happens is that I run and then nothing happens! I’m a little lost there!
– VitorCorreia