lower
strip
lstrip
앞뒤 공백(또는 지정 문자)을 제거합니다.
str.strip(chars?)
아래 값을 입력하면 예제에 즉시 반영됩니다.
print
text = " hello world " print(text.strip()) # "hello world" print("***hi***".strip("*")) # "hi"