VisualStudioCodeでPythonを実行する方法です
①VisualStudioCodeを開き、pyファイルを作成します
test.py
print('test')
② メニューの「表示」>「コマンドパレット」をクリックします

③「 python select interpreter 」を入力してインタープリターを選択します

④右クリックメニューで「ターミナルでPythonファイルを実行」をクリックします

VisualStudioCodeでPythonを実行する方法です
①VisualStudioCodeを開き、pyファイルを作成します
test.py
print('test')
② メニューの「表示」>「コマンドパレット」をクリックします
③「 python select interpreter 」を入力してインタープリターを選択します
④右クリックメニューで「ターミナルでPythonファイルを実行」をクリックします