1、输出数字
print(520)
print(98.5)
2、输出字符串
print('helloworld')
print("helloworld")
3、含有运算符的表达式
print(3+1)
4、将数据输出到文件中,注意点:1.所指定的盘符存在;2.使用file = fg
fg = open('D:/text,txt','a+') #a+:如果文件不存在就创建,存在就在文件内容后追加。
print('helloworld',file = fg)
fg.close()
5、不进行换行输出(输出内容在一行当中)
print(’hello','word','python')