Python基础–01
输出函数print

print(520)
print('helloworld')
print(3+2)
fp=open('D:/text.txt','a+')
print('helloworld',file=fp)
fp.close()
print('hello','world','pyhton')
转义字符与原字符

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')

标识符和保留字

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']