Skip to content

Instantly share code, notes, and snippets.

@tknhs
Created November 26, 2013 16:42
Show Gist options
  • Save tknhs/7661619 to your computer and use it in GitHub Desktop.
Save tknhs/7661619 to your computer and use it in GitHub Desktop.
多次元配列を平坦化(python2.6以降.python3では廃止)
from compiler.ast import flatten
flatten([0, [1, 2], [3, 4, [5, 6]], 7])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment