Created
January 16, 2013 17:55
-
-
Save agaerig/4549213 to your computer and use it in GitHub Desktop.
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
def middle_part(s): | |
if len(s.strip()) > 6: | |
new_str = s.strip()[3:(len(s.strip())-3)] | |
else: | |
new_str = '' | |
return new_str |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment