text = " Hello, World! \n"
cleaned_text = text.strip() # 양쪽 공백과 줄바꿈 제거
print(cleaned_text) # "Hello, World!"
# 특정 문자 제거
text = "###Hello###"
cleaned_text = text.strip('#') # '#' 문자 제거
print(cleaned_text) # "Hello"
text = "apple,banana,cherry"
split_text = text.split(',') # ','를 기준으로 나눔
print(split_text) # ['apple', 'banana', 'cherry']
# 기본 공백 기준으로 나눔
text = "Hello World"
split_text = text.split() # 공백 기준으로 나눔
print(split_text) # ['Hello', 'World']