Notice
Recent Posts
Recent Comments
Link
archive
[Python] 문자-아스키코드 변환 본문
다른 언어의 경우 문자를 int형으로 형변환하면 아스키코드값이 나오지만,
파이썬은 별도의 내장함수를 사용한다.
ord() : 문자를 아스키코드로 변환함
chr() : 아스키코드를 문자로 변환함
print(chr(65)) # A
print(ord("A")) # 65
'STUDY > Python' 카테고리의 다른 글
[Python] filter() 함수 (0) | 2021.03.10 |
---|---|
[Python] PID, PPID 구하기 (0) | 2021.03.04 |
[Python] with as (0) | 2021.02.24 |
[Python] zipfile 모듈 사용법 (0) | 2021.02.23 |
[Python] for-else, while-else (0) | 2021.02.19 |
Comments