import string
# 소문자 리스트
lower = [i for i in string.ascii_lowercase]
print(lower)
# ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
# 대문자 리스트
upper = [i for i in string.ascii_uppercase]
print(upper)
# ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
# 대문자 + 소문자 전체 리스트
lowup = [i for i in string.ascii_letters]
print(lowup)
# ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
'Programming Languages > Python' 카테고리의 다른 글
[Python] 파이썬 정렬함수 sort, sorted에서 reverse, key lambda 사용하기 (0) | 2021.09.04 |
---|---|
[Python] 파이썬 리스트의 문자열을 int로 바꾸는 방법 - map (0) | 2021.08.28 |
[Python] 파이썬에서 숫자를 내림차순으로 바꾸기 118372->873211 (0) | 2021.08.19 |
[Python] 파이썬에서 알파벳/문자열이 숫자인지 확인하는 방법 - isalpha, isdigit, isalnum (0) | 2021.08.17 |
[Python] 파이썬 index 함수 - 리스트에서 원하는 값의 인덱스 찾기 (0) | 2021.08.12 |