Actually you can do the same way: # Convert intAscii to charAscii S = [chr(x) for x in range(0,256)] for x in S: print x
#Convert charAscii to intAscii AsciiInt = [ord(x) for x in S] for x in AsciiInt: print x Best Regards, pujo On 5/26/05, John Carmona <[EMAIL PROTECTED]> wrote: > 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 > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor