SyntaxFix
Write A Post
Hire A Developer
Questions
Yes, you need to use global foo if you are going to write to it.
global foo
foo = [] def bar(): global foo ... foo = [1]