Created
April 2, 2020 05:27
-
-
Save AntiKnot/3e54f31806062918b3e443b803e2ca0d to your computer and use it in GitHub Desktop.
km-touch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shape = lambda n, m, default: [[default for _ in range(n)] for _ in range(m)] | |
| a = shape(2, 3, 0) | |
| print(a) | |
| a[0][1] = 2 | |
| print(a) | |
| """ | |
| [[0, 0], [0, 0], [0, 0]] | |
| [[0, 2], [0, 0], [0, 0]] | |
| """ | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
转换列表结构