I am trying to display an encrypted message by converting the characters in a string within a text file into their equivalent ASCII values. Once this is done, I would like to add an offset factor, say 10 and then convert back and display the message. Furthermore, I would also like it if somebody could overlook the spaces, meaning they do not get encrypted.Finally, a bonus would be if somebody could deduct 94 from the ASCII value if it's higher than 126.
So far, I've "generated" the integers, but all I all I get is square brackets
user_input = input("Enter a text file name. Remeber to add 'txt'")
file = open(user_input,"r+")
print(file.readline())
int_text = ([ord(c) for c in file.readline()])
print(int_text)
Thanks for the help.
raw_inputinstead ofinput