# # Example file # def main(): print "hello world" if __name__ == "__main__": main() print "me too" # declare a variable and initialize it f = 0 print f # re-declaring the variable works f= "abc" print f # Python is strongly typed, so you cannot concatenate a string with an integer # print "this is a string " + 123 will give an error # You must make sure everything you concatenate is the of the same type print "this is a string " + str(123)
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