初級 › Python 2のprint文をPython 3で使った原因と直し方 › パターン4
Python 2のprint文をPython 3で使った原因と直し方
Python 2の書き方(print文)をPython 3で使うと出るエラーです。
1 items = [1, 2, 3] 2 print_______ ^
File "main.py", line 2
print items
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
空欄を埋めて実行を通す
リストを渡す場合も同じです。printの後には必ず丸括弧が要ります。
次の問題