Odd-length string
Roy Smith
roy at panix.com
Sun Oct 6 09:46:03 EDT 2013
In article <0f1b6cd6-3025-4bdc-8f80-73a51a7ed241 at googlegroups.com>,
markotaht at gmail.com wrote:
> print("Key-" + str(võti) + ": " + str(unhexlify("".join(tulemus))))
>
> IM getting this error on this line. This is the print line of a decryption
> program. I wanti it to convert the tulemus which is in HEX to ASCII so i
> could read it. I could use online translators for the line, but since i have
> 255 lines of the HEX codes, it would be higly unefficient.
>
> How to i fix the Oddlenght string?
Some basic advice on asking for help:
1) Don't tell us what the error was, show us. Run your program, then
cut-and-paste the entire stack trace into your post.
2) Tell us what version of Python you're using. I'm assume one of the
Python 3 versions, since you put ()'s after print, but don't make people
guess.
3) Reduce the problem down to the smallest possible amount of code. Do
you get the error when you do:
print(str(unhexlify("".join(tulemus))))
what about
print(unhexlify("".join(tulemus)))
or
print("".join(tulemus))
or
print(str(võti))
every little thing you can hack away and still generate the error gets
you (and us!) one step closer to understanding what's happening.
More information about the Python-list
mailing list