gotoのインストールに問題がありますが、コード内で使用したいのかどうかは分かりません。メインループの内側のどこかで条件付きでポイントする、どうすればそれをPythonで理解できますか?ここ無限ループ内の特定のポイントに戻る方法
は、私はあなたがwhile True
プラスcontinue
とbreak
とその動作を得ることができます後藤
x = 0
#some code
a + b # just some place in code, which must be return point if further condition is true
if x > 0: # if x is not 0 make it 0
x = (x == 0)
#some code
if y == 1: # some result to make further condition true
x = (x + 1)
if x == 1:
# and here if I have this condition from above go to a + b and start from there
#some code
で、私はあなたが求めているのかわからないんだけど。しかし、標準のPythonには 'goto'はありません。あなたは 'turtle.goto'を意味しましたか?あるいは、 '' goto''(http://entrian.com/goto/)モジュールでしょうか? –
はいgotoモジュールですが、インストールに問題があります。何とかgotoを使わずに投稿を編集しました。 –