I have a list in a function that I have appended values into, now I am trying to wonder how I can call that list in another function.
2 Answers
You can declare a new global variable to point your list inside the function.
pointedList = []
copiedList = []
def function():
x = []
x.append("Something")
pointedList = x #Changes made to pointedList will change values in x
copiedList = x.copy() #Changes made to copiedList will not reflect in x
'''
Rest of the program
'''
def newFunction():
'''
You can use pointedList and copiedList here
'''
callis something you do to functions to execute them. It's not clear what you mean in the context of a list. Are you just trying to access the list?