How to Resolve Typeerror: Can Only Concatenate Str (Not "Int") to Str [Duplicate]
I Decided to Make Some Kind of Secret Code for Testing Purposes with Unicode. I've Done That by Adding Numbers to Unicode So It Would Be Kind of Secret. I've...
- I decided to make some kind of secret code for testing purposes with Unicode.
- I've done that by adding numbers to Unicode so it would be kind of secret.
- I've been getting this error, but I don't know how to solve it.
- Is there any solution?
Original Code
message = input("Enter a message you want to be revealed: ")
secret_string = ""
for char in message:
secret_string += str(chr(char + 7429146))
print("Revealed", secret_string)
q = input("")
Must Read
Original Error
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-182-49ece294a581> in <module>
2 secret_string = ""
3 for char in message:
----> 4 secret_string += str(chr(char + 7429146))
5 print("Revealed", secret_string)
6 q = input("")
TypeError: can only concatenate str (not "int") to str