Skip to content

Instantly share code, notes, and snippets.

@eyaltrabelsi
Created July 8, 2019 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eyaltrabelsi/847a37631a7ff81f2f7c1643a3422091 to your computer and use it in GitHub Desktop.
Save eyaltrabelsi/847a37631a7ff81f2f7c1643a3422091 to your computer and use it in GitHub Desktop.
Removing useless characters on the end/start/both of you string
>>> name = "//George//"
>>> name.strip("/")
'George'
>>> name.rstrip("/")
'//George'
>>> name.lstrip("/")
'George//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment