Python初心者がハマってしまったエラーへの対処を書きます。
<エラー>
TypeError: 'list' object is not callable
<原因>
関数であるlistを変数として定義してしまっている。
<対応方法>
1.whosで変数の一覧を確認し、listが変数として定義されていることを確認する。
whos
以下のように、実行結果を得られます。
listが変数として定義されてしまっています。
func function <function func at XXXXXXXXXXXX>
list list n=3
2.変数として定義してしまったlistを削除する。
del list
以上で、変数listを削除できました。
(もちろん、誤ってlistを変数定義している箇所の修正も必要。)