首页
/
每日頭條
/
科技
/
python入門手冊
python入門手冊
更新时间:2025-03-06 22:29:58

1、安裝python:

下載并安裝python3版本;

2、python在windows系統中的兩種運行方式:

示例:運行代碼 print("Hello python world!") ​​

1)在命令窗口終端運行python:

單擊開始菜單,運行"command"命令(或者按住shift鍵的同時,用鼠标右鍵單擊桌面任意位置,在彈出的右鍵快捷菜單中選擇"在此處打開命令窗口")——在命令窗口輸入“python“——在“>>>“提示符後輸入python命令代碼語句——然後回車運行代碼;

python入門手冊(python入門001安裝與運行)1

在命令窗口終端運行python

2)在編輯器中運行python:

安裝文本編輯器geany(讀作“吉尼”)——在文本編輯器中輸入python命令代碼語句——選擇“執行“(或按F5)運行代碼。

python入門手冊(python入門001安裝與運行)2

在編輯器中運行python

,
Comments
Welcome to tft每日頭條 comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Copyright 2023-2025 - www.tftnews.com All Rights Reserved