If I make a list in one function, and edit it, then I want to be able to pass the finished list off to another function where it will be used to do more things.
def func1():
numbers = [1, 2, 3, 4]
if numbers.count(1) > 0:
numbers.remove(1)
func2()
def func2():
two = numbers[0]
func1()
How could I get it so that it doesn't pull the error numbers not defined globally. I know why it is pulling the error, but after researching, I still can't find a good way to fix this problem.
func2(numbers).