파이썬 문자열 capitalize() 메서드
예제
이 문장의 첫 번째 글자를 대문자로 변환하세요:
txt = "hello, and welcome to my world." x = txt.capitalize() print (x)
정의 및 사용법
capitalize() 메서드는 첫 번째 문자를 대문자로 변환한 문자열을 반환합니다.
문법
string.capitalize()
파라미터 값
파라미터 없음
이 문장의 첫 번째 글자를 대문자로 변환하세요:
txt = "hello, and welcome to my world." x = txt.capitalize() print (x)
capitalize() 메서드는 첫 번째 문자를 대문자로 변환한 문자열을 반환합니다.
string.capitalize()
파라미터 없음