1) 문자열 -> 16진수
int(문자열,16)
int("0xffff",16) int("ffff",16)
2) 10진수 -> n진수
"{0:x}".format(수) //16진수 "{0:o}".format(수) // 8진수 "{0:b}".format(수) // 2진수
진수바꾸기 진수변환총정리 파이썬기초-진수변환