I have small a python script looking something like this:
def number1():
x = 1
open_numbers = []
open_numbers.append(x)
return open_numbers
def myfunction(open_numbers):
y = 1
open_numbers.append(y)
I would like to call the myfunction in the the end of the script. Using
myfunction()
But it keeps telling me missing 1 required positional argument: 'open_numbers'
Tried passing the argument and got name 'open_numbers' is not defined
I plan to add more functions later and run them the same way
function(arg)
function2(arg)
function3(arg)