PDA

View Full Version : python convert ascii to char



rob1101
December 1st, 2007, 03:39 AM
sorry to ask another noob question but i cant seem to find how to convert ascii decimals to strings.

ex. i want to convert 97 to a

thx in advance

duff
December 1st, 2007, 03:42 AM
chr(97)

teryowen
December 1st, 2007, 03:42 AM
chr(97)

and back

ord('a')

google is ur best friend bud.

rob1101
December 1st, 2007, 03:46 AM
chr(97)

and back

ord('a')

google is ur best friend bud.

trust me i tried. you would think it would be easy to find on google but it only comes up with results on binary and hex. anyway thanks for the quick replies guys.

teryowen
December 1st, 2007, 03:50 AM
weird... just so you know this is what i searched i guess its a skill now a days to search on google lol :P

what i searched: ascii to char in python

first result was it.

tyoc
December 1st, 2007, 05:12 AM
yes, I gess is a "skill" (the good is that is something that can be learn).

But sometimes people ask me to me things to search like "help me I need help in this subject", and thus aI go and find a good or infornative answer in the first results... (they search with the "patas" I guess... not to blame anyone :P)


ps: patas == foot:guitar::lolflag: