Jan-23-2017, 05:53 AM
Your function does not modify the global x and y.
You need to return the values.
You need to return the values.
def abc(x, y): x += 1 y += 1 return x, y x = 0 y = 1 print("Before: {} {}".format(x, y)) x, y = abc(x,y) print("After: {} {}".format(x, y))