- print()函数
# 输出数字 print(520); print(98.5); # 输出字符串 print('hello world'); # 输出含有运算符表达式 print(3+4); # 数据输出到文件中 fp = open('D:/pythonDemo/text.txt','a+');# a+表示不存在文件则自动创建,存在则追加 print('hello world',file=fp);# 要想把内容输出到文件当中 必须加file= fp.close();# 关闭 # 不进行换行输出(输出内容在一行当中) print('hello','world','python'); - 转义字符



