[Python] upper, lower | 문자열 대소문자 변경

문자열 전부 대문자로 변경 upper()

hello = 'hello WORLD'
print(hello.upper()) # HELLO WORLD
  • `upper()`: 모든 문자를 대문자로 변경해준다. 

 

문자열 전부 소문자로 변경 lower()

print(hello.lower()) # hello world
  • `lower()`: 모든 문자를 소문자로 변경해준다.

댓글

Designed by JB FACTORY