Skip to content

Instantly share code, notes, and snippets.

@mathiasbc
Last active June 22, 2017 08:53
Show Gist options
  • Save mathiasbc/ba1e69ea2bce4c8e446f2ee9691e6d37 to your computer and use it in GitHub Desktop.
Save mathiasbc/ba1e69ea2bce4c8e446f2ee9691e6d37 to your computer and use it in GitHub Desktop.
import re
l = [[1,2,[3]],4]
print([int(x) for x in re.findall('[0-9]+', str(l))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment