I defined distGPX function in a saperated file and I imported it into my main file.
def distGPX(Date, Distance):
Date1, Distance1 = Date, Distance
size = len(GPX1)
for n in range(0, size):
if '.gpx' not in GPX1[size - n - 1]:
Date1.pop(size - n - 1)
Distance1.pop(size - n - 1)
return Date1, Distance1
In the main file I call function this way
newDate, newDistance = distGPX(Date, Distance)
where Date and Distance were not changed. The problem is that at main program variables Date and Distance are change the same way as Date1 and Distance1.
Anyone can explain me the problem?