#可以输出数字
print(520)
#可以输出字符串
print('hello')
#含有运算符的表达式
print(3+1)
#将数据输出文件中,(所指定的盘符存在,使用file=fp)
fp=open('D:/text.txt','a+')#a+如果文件不存在就自动创建,存在就在文件内容的后面继续追加
print('hello ',file=fp)
fp.close()
#不进行换行输出(输出内容在一行当中)
print('hello','world','Python')
#转义字符
print('hello\nworld') #\n 换行
print('hello\rworld') #\r 回车
print('hello\tworld') #\t world将hello进行了覆盖
print('hello\bworld') #\b 退格
#原字符,不希望字符串中的转义字符起作用,就使用原字符,就是在字符串之前加上r或R
print(r'hello\nworld')
#注意最后一个字符不能是反斜杠
print(r'hello\nworld\')