What is the opposite of python's ord() function?

dkol picture dkol · Apr 23, 2015 · Viewed 29.1k times · Source

I found out about Python's ord() function which returns corresponding Unicode codepoint value. But what is the opposite function, i.e. get char value by int?

Edit: I'm new to SO, and couldn't find the answer here, so decided to post in order to everyone could find it more easily, although the answer is quite obvious. Then I read this - How much research effort is expected of Stack Overflow users? and realised it was a huge mistake. Apologies. hope it will be useful in that sense.

Answer

EvenLisle picture EvenLisle · Apr 23, 2015

chr() is what you're looking for:

print chr(65) # will print "A"