Python - String strip(), rstrip(), lstrip() 사용 방법 및 예제
Python에서 strip()을 이용하면 문자열에서 특정 문자를 제거할 수 있습니다. Java 등의 다른 언어들도 strip() 을 제공하며, 기능은 모두 비슷합니다. Python의 String은 다음 함수를 제공합니다. strip([chars]) : 인자로 전달된 문자를 String의 왼쪽과 오른쪽에서 제거합니다. lstrip([chars]) : 인자로 전달된 문자를 String의 왼쪽에서 제거합니다. rstrip([chars]) : 인자로 전달된 문자를 String의 오른쪽에서 제거합니다.