Skip to content

Instantly share code, notes, and snippets.

@kse0202
Last active September 21, 2020 09:43
Show Gist options
  • Select an option

  • Save kse0202/1e9fcae0d7057289dea388b51d33080b to your computer and use it in GitHub Desktop.

Select an option

Save kse0202/1e9fcae0d7057289dea388b51d33080b to your computer and use it in GitHub Desktop.
왼쪽 오른쪽 공백 지우기
import re

def clean_blank(text):
    
    cleaned_text = text.lstrip() #왼쪽 공백 제거
    cleaned_text = cleaned_text.rstrip() #오른쪽 공백 제거
    return cleaned_text```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment