print("Hello Paisley") print(8*3.57) fred = 100 print(fred) fred = 200 print(fred) fred = 200 john = fred print(john) number_of_coins = 200 print(number_of_coins) print(20 + 10 * 365) fred = ''' there are two muffins in the oven one says to the other its getting hot in here the other say oh my gosh a talking muffin!''' print(fred) joke_text = '%s: a device that keeps food cold' bodypart1 = 'Foot' bodypart2 = 'Hand' print(joke_text % bodypart1) print(joke_text % bodypart2) nums = 'I can touch my %s to my %s!' print(nums % ('feet', 'head')) print(nums % (bodypart1, bodypart2)) grocery_list = 'red vines, jelly beans, oreos, fruit leather, frosting, sprinkles' print(grocery_list) grocery_list = ['red vines', 'jelly beans', 'oreos', 'fruit leather', 'frosting', 'sprinkles'] print(grocery_list[4]) print(grocery_list) grocery_list.append('color spray') print(grocery_list) grocery_list.append('fondant') grocery_list.append('marzipan') grocery_list.append('food coloring') print(grocery_list) del grocery_list[6] print(grocery_list) list1 = [1, 2, 1, 2, 1, 2, 3] print(list1 * 3)
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