I have wrote a list in to a file, how can i get it back as old array list.
list looks like this
['82294', 'ABDUL', 'NAVAS', 'B', 'M', 'MSCS', 'CUKE', '30', 'Kasargod', 'CU', 'Kerala', 'Online', 'PG-QS-12', '15', 'June,', '2013', '12.00', 'Noon', '-', '02.00', 'PM\n', '29']
['82262', 'ABDUL', 'SHAFWAN', 'T', 'H', 'MSCS', 'CUKE', '30', 'Kasargod', 'CU', 'Kerala', 'Online', 'PG-QS-12', '15', 'June,', '2013', '12.00', 'Noon', '-', '02.00', 'PM\n', '29']
when i read the file, it does consider as a string list, for eg:
consider first list:
var[0][0] should be 82294 not '
i am a python noob,
pickle?evalcan achieve the goal though it is not safe. Re-serialize usingpickleis a better choice.