'Assign a global Array in Python
I found a project to learn Python: Tetris My plan was to assign a global Array in a variable() function to clean up my main() function.
but i get a syntax error
def globalv():
global x
x = 40
global y
y = 10
global Tetris[40][10]
for x in 40:
for y in 10:
Tetris[x][y] = 0
def main():
globalv()
if __name__ == "__main__":
main()
I don't know what i'm doing wrong Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
