Skip to content

Instantly share code, notes, and snippets.

@CodyKochmann
Created May 15, 2015 04:42
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 CodyKochmann/de4e9a791493912c5dae to your computer and use it in GitHub Desktop.
Save CodyKochmann/de4e9a791493912c5dae to your computer and use it in GitHub Desktop.
returns a substring starting with start and ending with end
def get_complete_string(s,start,end):
# returns a substring starting with start and ending with end
# By: Cody Kochmann
unique="~~~~the~obvious~way~to~do~it~~~~"
return(start+s.replace(start, unique).replace(end, unique).split(unique)[1]+end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment