So I do not want to use global variables, and I have a list that I want to use i different functions. How do I do it?
I got this so far:
class List:
def __init__(self):
self.myList = list()
def func1():
l = List()
l.myList.append(22)
def func2():
l.myList.append(34)
I get an error when executing the second function and the question is how I continue to put elements into myList using different functions.
Thank you