[파이썬] - 대문자/소문자 관련 함수 (upper/lower/isupper/islower)

zsunny·2022년 6월 23일
0

[Python] 문법

목록 보기
7/18

🔎 대문자 / 소문자 변경

1️⃣ upper( )

  • 문자열.upper()
s = hello
print(s.upper())		// HELLO 출력

2️⃣ lower( )

  • 문자열.lower()
s = HELLO
print(s.lower())		// hello 출력

🔎 대문자 / 소문자 확인

1️⃣ isupper

  • 문자열.isupper()
s = HELLO
print(s.isupper)		// True 출력

s = Hello
print(s.isupper)		// False 출력

2️⃣ islower

  • 문자열.islower()
s = hello
print(s.islower())		// True 출력

s = Hello
print(s.islower())		// False 출력
profile
매일 성장하는 예비 웹 개발자 🌱

0개의 댓글