打印字符串,字符串单双引号均可
print "This is fun."
print 'Yay! Printing.'
注释符号 #
# A comment, this is so you can read your program later.
# Anything after the # is ignored by python.
格式化打印
my_name = 'Zed A. Shaw'
my_height = 74 # inches
my_eyes = 'Blue'
my_hair = 'Brown'
print "Let's talk about %s." % my_name
print "He's %d inches tall." % my_height
print "He's got %s eyes and %s hair." % (my_eyes, my_hair)
%r 不管什么都打印出来