[Tutor] Python challenge and decryption
Dave Angel
d at davea.name
Wed Dec 21 13:43:52 CET 2011
On 12/21/2011 06:39 AM, Joaquim Santos wrote:
> Hi List!
>
> Thanks for all the input you guys gave me!
>
> I'm trying to implement your ideas on the function and I've been getting
> some parts right (the correct translation, still vertical and without
> spaces) or the wrong translation but with spaces... My problem is my range
> check. I'm also getting a funny problem with return, but I'll ask about it
> later.
>
> What I would like to know now, because it would help me a lot to draw my
> solution(I like to make sketches/line numbers while I'm thinking) was where
> to get the ascii table for Python! I searched and got a lot of modules and
> stuff to install and print it out but no printed online version? You can
> find for other languages, so where is the one for Python?
>
> I know I could install the said modules/scripts but I just think this
> should also be somewhere...
>
ASCII predated Python by some 40 years. So any reference that is
accurate would do. But you can make your own table quite trivially with
a simple loop:
for ordinal in range(ord(" "), 128):
print ordinal, "-", chr(ordinal)
ASCII codes below " " are control codes, such as newline and tab.
ASCII is a 7-bit code, so the highest value is 127.
--
DaveA
More information about the Tutor
mailing list