Hi all,
I am trying convert IP addresses form Decimal format [Like] to HEX format [c0 a8 9d 80].
For Example the IP "" is equivalent to "c0 a8 9d 80" in HEX.
How to do that.??

One way.

>>> ip = ""
>>> ip = ip.split('.')
>>> ' '.join((hex(int(i))[2:] for i in ip))
'c0 a8 9d 80'
commented: It helped me alot... +3