chr() is a function in Python or PHP which returns the character (string of length one) that corresponds to an ASCII code point.
Questions tagged [chr]
166 questions
-6
votes
3 answers
Unicode recursion for a number
I want to get any number. e.g: 14892. And return it as 25903
(according to each character's unicode value)
This is what I have so far:
def convert(n):
if len(n)>0:
x = (chr(ord(str((int(n[0])+1)))))
return x

Lucas Chad
- 19
- 1
- 1
- 3