[pyar] Archivos en python
Terry Reedy
tjreedy en udel.edu
Jue Ago 2 14:29:17 ART 2012
On 7/20/2012 4:40 PM, Javier Marín wrote:
> def registrar_llamadas(self):
> txt = open("llamadas.txt", 'w')
mejor: with open("llamadas.txt", 'w') as txt:
http://docs.python.org/reference/compound_stmts.html#the-with-statement
> t.write ('Operadora \t Costo/min \n Tiempo \t
txt.write
> txt = close("llamadas.txt")
txt.close(), pero no necesita con 'with'
--
Terry Jan Reedy
More information about the pyar
mailing list