0

Convert an ASCII value into a charcter

I want to convert an ASCII value in to a character. In phyton 2.7 i use chr("number"), but it dont work for the code playground in solo learn. What should I do?

1st Feb 2018, 12:44 PM
gabi
3 odpowiedzi
+ 4
Make sure you are applying chr() to an int and not a string. It definitely works on SoloLearn. See: https://code.sololearn.com/cp0WjJ8fRVcJ/?ref=app
1st Feb 2018, 1:38 PM
Eric Blinkidu
Eric Blinkidu - avatar
+ 2
are you sure?? print( chr(65) ) # 65 ASCII -> 'A'
1st Feb 2018, 1:28 PM
KrOW
KrOW - avatar
+ 1
thank you for your answers! now i found my error
1st Feb 2018, 2:13 PM
gabi