Python/라이브러리
파이썬(python) 라이브러리 - string
snowman95
2021. 5. 18. 12:39
728x90
반응형
string
0~9 까지 숫자, a~z까지 알파벳을 일일이 적지않고 바로 가져올 수 있다.
알면 꽤 편리한 라이브러리다.
import string
string.ascii_lowercase # 소문자 abcdefghijklmnopqrstuvwxyz
string.ascii_uppercase # 대문자 ABCDEFGHIJKLMNOPQRSTUVWXYZ
string.ascii_letters # 대소문자 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
string.digits # 숫자 0123456789
참고) 공식 문서
6.1. string — Common string operations — Python 3.4.10 documentation
6.1. string — Common string operations Source code: Lib/string.py 6.1.1. String constants The constants defined in this module are: string.ascii_letters The concatenation of the ascii_lowercase and ascii_uppercase constants described below. This value is
docs.python.org
반응형