print "Mary had a little lamb." print "Its fleece was as white as %s." % 'snow' print "And everywhere that Mary went." # Apparently the *10 at the end tells python to take this action ten times on the same line. print "." * 10 end1 = "c" end2 = "h" end3 = "e" end4 = "e" end5 = "s" end6 = "e" end7 = "b" end8 = "u" end9 = "r" end10 = "g" end11 = "e" end12 = "r" # With a comma at the end of a line python keeps doing functions on the first line. Its way of making # the code readable. IT also puts a space between the two lines. print end1 + end2 + end3 + end4 +end5 + end6, print end7 + end8 + end9 + end10 + end11 + end12
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