Last active
September 20, 2020 09:12
-
-
Save SahbiOuali13/2b01679d151f60294f3e6b362f8cb254 to your computer and use it in GitHub Desktop.
Cleans a string from spaces and other characters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
greet = ' Hello Python ' | |
>>greet.lstrip() | |
'Hello Python ' | |
>>greet.rstrip() | |
' Hello Python' | |
>>greet.strip() | |
'Hello Python' | |
nom = ";,: olom',;:" | |
>>>print(nom.strip(";,: '")) | |
'olom' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment