Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: django clear _pycache_ command 
Python :: select option from dropdown in selenium python 
Python :: py 
Python :: Blender Python set center to center of mass 
Python :: tkinter textbox enable only 1 line 
Python :: what does 0 for in array mean python 
Python :: pip django graphql 
Python :: autoscrapper basic code 
Python :: how to show Screen keyboard ubuntu with python 
Python :: tkinter set widht 
Python :: cairo.context transform vertical text python 
Python :: pandas get cvvlaue from antoiher column fom one coluikmnn value 
Python :: python how to hash string into pbkdf2 
Python :: python join tuple integer to string 
Python :: Flask-WTF select field from database 
Python :: how to map data to a scale python 
Python :: user_info = user_info.save(commit=False) 
Python :: select values for row matching condition 
Python :: optimal alpha jupyter 
Python :: no module named cbor2 windows 
Python :: remove the secound to last veriable in a list python 
Python :: chrome drivers documentation 
Python :: value counts normalize 
Python :: how to make py file open in current directory 
Python :: python format method align center 
Python :: df select custom index 
Python :: online python debugger 
Python :: python star sign before list 
Python :: fast guess for divisible numbers between two numbers 
Python :: how to print the freq of each char by using dict in python 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =