Python snippets

From ZENotes
Revision as of 09:57, 1 May 2013 by Admin (Talk | contribs)
Jump to: navigation, search

Hello World

   #---------------------------------------------------
   # This demo program shows off how elegant Python is!    
   # Written by Joe Soap, December 2010.
   # Anyone may freely copy or modify this program.
   #---------------------------------------------------
   
   print("Hello, World!")     # Isn't this easy!
   

If you are not sure what class a value falls into, Python has a function called type which can tell you.

   print(type("Hello, World!"))
   print(type(17))
   print("Hello, World")
   


Back to Python

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox