Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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

number_1 = 5
number_2 = 10

def multiply_and_add(number_1, number_2):
    number_1 = number_1 * 10
    number_2 = number_2 * 10
    return number_1 + number_2

a_sum = multiply_and_add(number_1, number_2)
print(a_sum)
print(number_1)
print(number_2)
Source by www.dataquest.io #
 
PREVIOUS NEXT
Tagged: #difference #changing #values #variable #list #function #python
ADD COMMENT
Topic
Name
8+1 =