Skip to content

Instantly share code, notes, and snippets.

@ideamonk
Created March 2, 2011 12:56
Show Gist options
  • Select an option

  • Save ideamonk/850883 to your computer and use it in GitHub Desktop.

Select an option

Save ideamonk/850883 to your computer and use it in GitHub Desktop.
flatten a nasty nested list into a string
def flatten(listy_list):
return ''.join([x if type(x)==type('') else flatten(x) for x in listy_list ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment