String to char and decimal number conversion

Stefan Behnel stefan_ml at behnel.de
Tue Jan 11 08:08:07 EST 2011


SANKAR ., 11.01.2011 01:00:
> I am reading a Test.txt (see atatchment) file using following code to get
> the T2:
>
> F =open('C:\Test.txt','r')
> T1 = F.readlines()
> for i in range(len(T1)):
>         T2 = T1[i].split(',')
>         print(T2)

Take a look at the "csv" module in the standard library.

Stefan




More information about the Python-list mailing list