Skip to content
Advertisement

Tag: string

Print text from right side

May I know how to print text to the right side like: I only know center code is this: Thanks Edit str.rjust(165//2) is center text from: How to place input function in center of page? Answer You are doing well just try to use an int like this The first value is the amount of space de second is the

Represent string characters as hex values in python

I’m trying to represent a given string in hex values, and am failing. I’ve tried this: For the first one I get “ValueError: non-hexadecimal number found in fromhex() arg at position 0” error For the second I get that there’s no decode attribute to str. It’s true but I found it here so I guessed it’s worth a shot. My

Advertisement