初級 › Python 2のprint文をPython 3で使った原因と直し方 › パターン5
Python 2のprint文をPython 3で使った原因と直し方
Python 2の書き方(print文)をPython 3で使うと出るエラーです。
1 temp = 25 2 print___________ ^
File "main.py", line 2
print temp, "C"
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
空欄を埋めて実行を通す
複数の値と文字列を混ぜて表示する場合も、丸括弧でまとめて渡します。
次の問題