How to decode a list a ords back to chrs in python

16 views Asked by At

So I recently stumbled upon a profile of a user- https://stackoverflow.com/users/13717976/hamburger?tab=profile and there is a little quiz there on how to get his contact. I tried doing it but I was stuck at this part of the code-

my_contact = [71, 77, 65, 73, 76, 58, 32, 117, 109, 97, 115, 97, 114, 121, 97, 110, 64, 103, 109, 97, 105, 108, 46, 99, 111, 109, 59, 32, 67, 111, 110, 103, 114, 97, 116, 115, 32, 111, 110, 32, 100, 101, 99, 111, 100, 105, 110, 103, 32, 116, 104, 97, 116, 33, 10, 65, 108, 115, 111, 32, 99, 104, 101, 99, 107, 32, 116, 104, 105, 115, 32, 111, 117, 116, 58, 32, 104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, 121, 111, 117, 116, 117, 98, 101, 46, 99, 111, 109, 47, 119, 97, 116, 99, 104, 63, 118, 61, 100, 81, 119, 52, 119, 57, 87, 103, 88, 99, 81]

# HINT: It's in ord format convert these single numbers into characters using the chr function then save the chrs in a list then using the join function join them together to form a piece of text!

def decode(ord_list):
    chr(ord_list)

print(decode(my_contact))

It gives me the error an integer is required got type I have no idea what this means as I am a newbie to python. Any further suggestions, help, comment, answers are readily accepted!

0

There are 0 answers