3.8 - Using the Print Function

来源:互联网 发布:网上开淘宝店流程 编辑:程序博客网 时间:2024/05/18 00:49
temp_string = "Hello Python"print("temp_string: {0}".format(temp_string))fruits = ["apple", "orange", "banana"]for fruit in fruits:    print(fruit)



运行结果:


temp_string: Hello Python

apple

orange

banana




当按ctrl + enter的时候,执行完了不会显结果,如果想要显示结果则用print吧

0 0
原创粉丝点击