I am new to python. My intention is to read the file digi.txt and store in 
separate arrays all the values of each columns. However, the following 
program prints only the last value, i.e. 1350696500.0.
Please help to rectify this.

f = open ("digi.txt", "r+")

datafile = f.readlines()

list_of_lists = datafile
for data in list_of_lists:
    lstval = data.split (',')
    timest = float(lstval[0])
    energy = float(lstval[1])

f.close()
print timest

Regards,
Arijit Ukil
Tata Consultancy Services
Mailto: arijit.u...@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to