I have the followring script:
#!/usr/bin/python3
f = open('importaciones2015-2016SFe-utf8.csv')
lineas = f.readlines()[1:]
for linea in lineas:
rubro, producto, unidad , ant , actual = linea.split(";")
print(int(actual.replace(".","")) - int(ant.replace(".","")))
f.close()
It works, but I wonder if there is a better way to substract numbers with thousands separators, instead of using replace
.