gibroh@hotmail.c
(usa Lubuntu)
Enviado em 21/07/2012 - 22:57h
>>> >>>
>>> f=ope('c:/python27//xis.txt','r')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'ope' is not defined
>>> f=open('c:/python27//xis.txt','r')
>>> cont=f.readlines()
>>> print cont
['123\n', '-456\n', '90']
>>> for x in cont:print (x)
123
-456
90
>>> for y in cont:print(float(x)+100)
190.0
190.0
190.0
>>>
>>> for t in cont:print(float(t)+1000)
1123.0
544.0
1090.0
>>> for t in cont:print(float(t)+1000)