본문 바로가기

Study/Useful Source Codes

Python , String to Hex after removing chr (Hex->String)

# Convert String to Hex after removing chr    ex) 0x

def toString(str, chr):

        result = []

        result = str.replace(chr,'')

result = result.decode("hex")

        return reduce(lambda x,y:x+y,result)


'Study > Useful Source Codes' 카테고리의 다른 글

Python , Remove Characters (문자열 제거)  (0) 2016.01.07
Python, String to Hex (String->Hex)  (0) 2016.01.07