Skip to content

Instantly share code, notes, and snippets.

@607011
Created December 27, 2015 18:22
Show Gist options
  • Save 607011/585b425e41a841d122a2 to your computer and use it in GitHub Desktop.
Save 607011/585b425e41a841d122a2 to your computer and use it in GitHub Desktop.
Generate 2D array of width w and height h
result = [a[:] for a in [[' '] * h] * w]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment