##参考资料 极客学院的python部分 http://wiki.jikexueyuan.com/list/python/ 廖雪峰的python2.7教程 http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000
##注释部分 单行注释用#,多行注释用三个单引号或者三个双引号
#单行注释
'''
多行注释
'''
##输出部分
\n 表示换行
\t 表示一个制表符
\\ 表示 \ 字符本身
格式化输出用%
who1='Bob'
who2='Li'
print '%s said:"I\'m %s,who are %s"' % (who1,who1,who2)
输出为Bob said:"I'm Bob,who are Li"
多行打印用r''' ''' 如果是输出中文多行,比如输出一首唐诗
ustr1=ur'''
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。
'''
print ustr1
##变量部分
###数学计算
var1=2.5+10/4
print var1
#结果是4.5.因为10整除4后结果是2.不是2.5
var2=2.5+10.0/4
print var2
#结果是5.0
###布尔计算
str1='python'
str2=''
print 'hello',str1 or 'world'
print 'hello',str2 or 'world'
分别输出 hello python hello world