x = 4 #create a variable with name x and store the int 4 in it y = 10 z = x * y # get the values stored in x and y, then # calculate the return value of the multiplication expression, then # create the variable z and store the expression's returned value in it x = 20 # store 20 in the variable x (thus replacing the 4) print x # get the value stored in x and print it print z
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question