# 学习内容:1、输出函数print
#可以输出数字
print(520)
#输出字符串
print('hello world')
#含有运算符的表达式
print(3+1)
#将数据输出到文件中。a+:有该文件读,无就新建一个
fp=open('D:/text.txt','a+')
print('hello world',file=fp)
fp.close() #注意点:1.所制定的盘存在。2.使用file=fp.
#不进行换行输出,输出内容一行当中
print('hello world','wwww','hhjk')
# 学习内容:2、转义字符与原字符
#转义字符
print('hellonworld') #n:转义字符,表示换行
print('helloworld')
print('hellotworld') #t:四个一组
print('hellorworld') #r:回车输出覆盖前面的内容
print('hellobworld') #b:退一个格,将o退没了
print('http:\\www.baidu.com') #两个\输出一个
print('老师说:‘大家好 ’')
#原字符。不希望字符串中的转义字符起作用,就使用原字符,就是在字符串之前加上R或r
print(r'hellonworld')
#print(r'hellonworld') 注意事项,最后一个字符不能为反斜杠
print(r'hellonworld\') #这个可以



