I'm trying to make an ASCII to string converter (not sure if that is correct terminology) using chr() but when I type in something like 68 (capital D), nothing happens. I'm trying to accomplish it using this idea:
>>> L = [104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100]
>>> ''.join(chr(i) for i in L)
'hello, world'
I want it to run as a program with user defined input so I came up with this:
templist = []
number = int(input("Please enter an ASCII number here: "))
templist.append(number)
''.join(chr(i) for i in templist)
As I said above however, when I enter a value, nothing happens.
Any help is greatly appreciated.
EDIT: I have tried printing templist but it just gives me back the number I want to be converted to characters (68).