상세 컨텐츠

본문 제목

대/소 문자 바꾸기 - upper(), lower()

파이썬

by simstealer 2021. 11. 26. 23:42

본문

사용법

string.upper() - 소문자 -> 대문자

 

a = "hellow"

a.upper()

'HELLOW'

 

혹은

 

"hi".upper()

'HI'

 

사용법

string.lower() - 대문자 -> 소문자

 

a = "HELLOW"

a.lower()

'hellow'

 

혹은

 

"HI".lower()

'hi'

 

'파이썬' 카테고리의 다른 글

문자 바꾸기 - replace()  (0) 2021.11.26
공백 없애기 - strip  (0) 2021.11.26
문자열 삽입 - join  (0) 2021.11.25
위치 확인하기 - find(), index()  (0) 2021.11.25
(함수) count() - 문자열 개수 세기  (0) 2021.11.25

관련글 더보기

댓글 영역