difference between changing values of variable and list inside function in python

Solutions on MaxInterview for difference between changing values of variable and list inside function in python by the best coders in the world

showing results for - "difference between changing values of variable and list inside function in python"
Mia
28 Sep 2018
1number_1 = 5
2number_2 = 10
3
4def multiply_and_add(number_1, number_2):
5    number_1 = number_1 * 10
6    number_2 = number_2 * 10
7    return number_1 + number_2
8
9a_sum = multiply_and_add(number_1, number_2)
10print(a_sum)
11print(number_1)
12print(number_2)
similar questions