Skip to content

Instantly share code, notes, and snippets.

@agaerig
Created January 16, 2013 17:55
Show Gist options
  • Save agaerig/4549213 to your computer and use it in GitHub Desktop.
Save agaerig/4549213 to your computer and use it in GitHub Desktop.
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