LoginSignup
1
0

More than 1 year has passed since last update.

Pythonに++や--は使えない。

Posted at

タイトルのまんまです。

pythonには他の言語でインクリメント、ディクリメント時によくみられる++, --が使えません。
代わりに+=1, -=1を使いましょう。

n++ #エラー
n-- #エラー

n+=1
n-=1
1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0