導入

ダウンロード

Download Python | Python.org

"Windows embeddable package"は、他のアプリケーションの一部として動作させるための、最小の環境です。The embeddable package - 4. Using Python on Windows — Python 3.x documentation

既定では%LOCALAPPDATA%\Programs\Python\PythonVersionNumberにインストールされます。Why is Python for Windows not installed in %PROGRAMFILES% ("C:\Program Files")? - Super User

インストール時のオプション「Compile .py files to byte code after installation」をチェックすることで、インタプリタがわずかに高速化されます。python - Should I "Compile .py Files to Byte Code after Installation"? - Stack Overflow

ストアアプリ版

ストアアプリでは、64bit版だけの提供となります。Python Software Foundation - Microsoft Apps

The Microsoft Store package - 4. Using Python on Windows — Python 3.x documentation

%USERPROFILE%\AppData\Local\Microsoft\WindowsAppsにインストールされます。

Python 2とPython 3

Python 3には後方互換性がありませんが、それが問題とならないならばPython 3を用います。

利用方法

REPL (read–eval–print loop)

REPLは、対話型のインタプリタです。16.1. Interactive Mode - 16. Appendix — Python 3.x documentation

コマンドプロンプトを起動し、Pythonのインストール ディレクトリにあるpython.exeを実行します。2. Using the Python Interpreter — Python 3.x documentation

C:\Python3*>python
Python 3.*.*
Type "help", "copyright", "credits" or "license" for more information.
>>>

終了するにはCtrl + Zを押下するか、exit()と実行します。

起動しようとしたときに応答がない、もしくはMicrosoft Storeアプリが起動するならば、

C:\where python

としてファイルのパスを確認します。Pythonを実行しようとしたらMicrosoftStoreに飛ばされた件 #Python3 - Qiita

ショートカットキー

キー 機能
Tab 自動補完
↑ or ↓ コマンド履歴を利用
Ctrl + U カーソル以前のテキストを削除
Ctrl + K カーソル以降のテキストを削除
Ctrl + L 画面をクリア
Ctrl + D REPLを終了

IDLE

IDLEは統合開発環境であり、学習用の環境でもあります。IDLE — Python editor and shell — Python 3.x documentation

スタートメニューの[IDLE (Python)]を実行するか、インストールディレクトリにあるLib\idlelib\idle.pywを実行します。