Python基础–01
输出函数print
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/cdd78bb1c071efcf22ea0da22852a81f.png#pic_center)
print(520)
print('helloworld')
print(3+2)
fp=open('D:/text.txt','a+')
print('helloworld',file=fp)
fp.close()
print('hello','world','pyhton')
转义字符与原字符
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/9a5a589075fe9f4e7a105207bbde4377.png#pic_center)
print('hello\nworld')
print('hello\tworld')
print('hello000\tworld')
print('hello\rworld\rfhd')
print('hello\bworld')
print('http:\\\www.com')
print('老师说:\'大家好\'')
print(r'hello\nworld')
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/f577f398ab0a99446dc047932279f3e3.png#pic_center)
标识符和保留字
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/d95b59c4db262d18f1412c9e5ba67fa5.png#pic_center)
import keyword
print(keyword.kwlist)
['False', 'None', 'True', '__peg_parser__', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']