Is there a way to give classes access to global variables in python without passing it as a parameter? The following is what I want to do:
# Global
data = []
# Class
Foo:
def __init__(self):
self.name = data[0]
# Main
data = ["name", "name2"]
f = Foo()