진법
-
[Python] - N진수 표현 및 Ascii개발/Python 2022. 7. 27. 18:07
Python 진법 변환 1. N Base -> 10 Base value is A number or a string that can be converted into an integer number base is A number representing the number format. Default value − 10 Syntax - int(value, base) # N base to 10 base print(int('101',2)) > 5 print(int('202',3)) > 20 print(int('ADF',16)) > 2783 2. 10 Base -> 2 / 8 / 16 Base bin(), oct(), hex() function support # 2base print(bin(11)[2:]) > 10..