내장 함수
ord()
문자를 아스키코드(ascii)로 변환해주는 함수
형식: ord('문자')
ord('a') #97
ord('A') #65
chr()
아스키코드(ascii)를 문자로 변환
형식: chr(숫자)
chr(97) #a
chr(65) #A
출력 가능한 ascii 문자표
| A~Z | 65~90 |
| a~z | 97~122 |


'Language > Python' 카테고리의 다른 글
| Python 비트 마스크(Bit Mask) (0) | 2022.09.26 |
|---|---|
| [Python] inconsistent use of tabs and spaces in indentation 에러 (0) | 2022.09.21 |
| Python bisect.bisect_left()와 bisect.bisect_right (0) | 2022.09.10 |
| [python] 파이썬 리스트의 슬라이싱 (0) | 2022.09.05 |
| [Python]파이썬 자료형별 시간복잡도 정리 (0) | 2022.09.03 |