- 打印
print "Hello,World!"
#!/usr/bin/python
#coding=utf-8 ###python2.7指定utf-8才能打印出中文,默认编码是ASCII
print "你好"
- 接收字符串
i1 = raw_input("") ###python2.7
i1 = input("") ###python3.6
- python内置变量
| and | exec | not |
| assert | finally | or |
| break | for | pass |
| class | from | |
| continue | global | raise |
| def | if | return |
| del | import | try |
| elif | in | while |
| else | is | with |
| except | lambda | yield |