怎么保存python程序_用Python保存程序

本文介绍了如何在Python IDLE(GUI)中创建、保存和运行Python程序,强调了文件扩展名应为'.py'。通过修改程序,展示了如何在程序执行后保持命令提示符打开以查看结果。
摘要由CSDN通过智能技术生成

怎么保存python程序

Here I am using

我在这里用

Python IDLE(GUI) to write a simple program and save it, so that we can just execute it in future. Because when we write any program and exit from Python then program that we have written will be lost. So for not losing our program we save it.

Python IDLE(GUI)编写一个简单的程序并将其保存,以便我们将来可以执行它。 因为当我们编写任何程序并退出Python时,我们编写的程序都会丢失。 因此,为了不丢失程序,我们将其保存。

So when we use Python IDLE(GUI) we can navigate to "File" and then click on "New Window" or we can use shortcut i.e."Ctrl+N" which will open a new text editor where we can write our program and save it into any location on the operating system. From the new window we can execute our program too.

因此,当我们使用Python IDLE(GUI)时,我们可以导航至“文件” ,然后单

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值