exercicio-arquivos-for.py
Click here to get the file
Size
1 kB
-
File type
text/python-source
File contents
f = open("readlines.txt", "r")
str = ""
for l in f:
str = str+ l[:-1]+" %d\n"%(int(l.split(" ")[-1])**2)
f.close()
f = open("readlines2.txt", "w")
f.write(str)
f.close()