创建一个py文件并运行

在 Linux 中,可以直接用vim 或者 vi 来编辑一个 python 文件

  1. vim hello.py

    进入编辑页面
#coding:utf-8
print("你好")

(因为在Linux 中,可能不支持中文,我们可以加入[#coding:utf-8])

退出后,输入 python hello.py

运行结果:

你好

待续......

猜你喜欢

转载自www.cnblogs.com/mu-ran-2501590635/p/11965979.html