# Convert String to Hex
def toHex(str):
result = []
for character in str:
hv = hex(ord(character)).replace('0x','')
result.append('%'+hv)
return reduce(lambda x,y:x+y,result)
'Study > Useful Source Codes' 카테고리의 다른 글
Python , String to Hex after removing chr (Hex->String) (0) | 2016.01.07 |
---|---|
Python , Remove Characters (문자열 제거) (0) | 2016.01.07 |