I am building a code that looks something like this:
def firstfunction()
index1 = 0
index2 = 0
somedataframe1 = [...]
somedataframe2 = [...]
while somecondition1:
secondfunction(index1 somedataframe1)
secondfunction(index2 somedataframe2)
def secondfunction(index somedataframe)
while somecondition2:
somedataframe.doathing[index]
index = index + 1
firstfunction is supposed to iterate through calling secondfunction a number of times for two different dataframes, then second function iterates through a big section of code where it manipulates parts of the supplied dataframe according to the index value, and at the end I want it to increment the index value. And it follows the exact same process separately with both dataframes. When secondfunction changes the value of index, will that change automatically be extended to index1 or index2, whichever 1 is being used at the time? Or will the change be local?