[Tutor] (no subject)

John Carmona jeannot18 at hotmail.com
Thu May 26 01:47:22 CEST 2005


With the help of Pujo Aji I have written this little script that print every 
single ASCII code>>

S = [chr(x) for x in range (0,256)]
for x in S:
    print x,

The next step is to use the built-in functin ord() in order to convert each 
character to an ASCII integer. I have had a look at the ord() function but 
it says that it only take one argument i.e. ord('a'). How could I execute to 
convert each character into an ASCII integer?

Thanks in advance
JC




More information about the Tutor mailing list