Skip to content

Instantly share code, notes, and snippets.

/.py Secret

Created March 28, 2017 22:37
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 anonymous/fb62690630b3f804e1ee9bb1fcab1767 to your computer and use it in GitHub Desktop.
Save anonymous/fb62690630b3f804e1ee9bb1fcab1767 to your computer and use it in GitHub Desktop.
# test -> extract_unique_elements([2,2,3,[[[3]]]])
def extract_unique_elements(a_list):
for elt in range(len(a_list)):
if isinstance(a_list[elt],list):
return extract_unique_elements(a_list[elt])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment