Anonymous user
Character codes: Difference between revisions
→{{header|Python}}
m (→{{header|REXX}}: re-wrote the REXX program with more displays and more comments.) |
|||
Line 1,052:
print unichr(960) # prints "π"</lang>
{{works with|Python|3.x and 2.x}}
Here character is just a string of length 1
<lang python>print(ord('a')) # prints "97"
print(ord('π')) # prints "960"
print(chr(97)) # prints "a"
print(chr(960)) # prints "π"</lang>
|