반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- dataframe
- PANDAS
- Python
- numpy
- 파이썬
- Kotlin
- c#
- PostgreSQL
- string
- django
- Google Excel
- Google Spreadsheet
- Java
- google apps script
- Github
- Tkinter
- Redshift
- hive
- GIT
- Excel
- gas
- Mac
- math
- matplotlib
- Apache
- PySpark
- SQL
- array
- list
Archives
- Today
- Total
달나라 노트
Python Basic : hex() (10진수를 16진수로 변환. 10진수 16진수 변환. hexadecimal number) 본문
Python/Python Basic
Python Basic : hex() (10진수를 16진수로 변환. 10진수 16진수 변환. hexadecimal number)
CosmosProject 2024. 3. 7. 19:23728x90
반응형
Python의 내장함수 oct()는 10진수를 8진수로 변환해줍니다.
print(hex(17))
-- Result
0x11
17을 16진수로 바꿔보았습니다.
결과에 있는 0x를 지우면 11이 되는데, 바로 이 부분이 16진수를 의미합니다.
(0x에서 x는 hex를 의미하며 16진수를 뜻합니다.)
11을 10진수로 변환해보면 실제로 17이 나옵니다.
728x90
반응형
'Python > Python Basic' 카테고리의 다른 글
Python Basic : RGBA, ARGB 변환 (4) | 2024.03.07 |
---|---|
Python Basic : RGB, RGB Hex color 변환 (0) | 2024.03.07 |
Python Basic : oct() (10진수를 8진수로 변환. 10진수 8진수 변환. Octal number) (2) | 2024.03.07 |
Python Basic : bin() (10진수를 2진수로 변환. 10진수 2진수 변환. Binary number.) (0) | 2024.03.07 |
Python Basic : dir (class의 method, attribute 확인하기, class method, attribute 리스트 확인) (0) | 2024.02.27 |
Comments