hi I want to know the easyest way to readline() or readlines() or read()
a file so far I have this
>>> file = open( 'write_total.txt', 'r' )
>>> file.readlines()
['Line 1\n', 'Line 2\n', 'Line 3\n', 'Line 1\n', 'Line 2\n', 'Line 3\n']
>>>
I am not sure why this repeats line1 line2 line3 then line 1 line 2 line 3 there is 6 lines in the file.
but anyway if that does not matter...
How can I see the data such as $10.00 and not 'Line 1\n'....
How can I sum each line until it equals $60.00
Thanks for any help.
$10.00
$10.00
$10.00
$10.00
$10.00
$10.00