When I try convert a parameter into global variable it gives the following error. Is there any way where I can convert the imported paramter to global without using two different names? Edit : The solve(grid) will be called by another module. I want to make sure the parameter becomes global after the function being called.
>>> grid = []
>>> def solve(grid)
... global grid
...
Output:
File "<stdin>", line 1
SyntaxError: name 'grid' is local and global