Python: Difference between revisions

From Halfface
Jump to navigation Jump to search
Line 6: Line 6:


=basics=
=basics=
print "Hello, World!"
command called print followed by one argument,which is "Hello, World!". (referred to as a string of characters, or string) Command and its arguments are collectively referred to as a statement,


  sys.argv  arguments are passed to the script in the variable sys.argv
  sys.argv  arguments are passed to the script in the variable sys.argv
  #          is used to start a comment
  #          is used to start a comment

Revision as of 21:13, 5 October 2011

links

http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_2.6
http://docs.python.org/tutorial

Reference

http://docs.python.org/ref/ref.html

basics

print "Hello, World!"

command called print followed by one argument,which is "Hello, World!". (referred to as a string of characters, or string) Command and its arguments are collectively referred to as a statement,

sys.argv   arguments are passed to the script in the variable sys.argv
#          is used to start a comment