TypeError: 'list' object is not callable in python

前端 未结 11 1697
醉梦人生
醉梦人生 2020-11-22 13:11

I am novice to Python and following a tutorial. There is an example of list in the tutorial :

example = list(\'easyhoss\')

Now

11条回答
  •  一向
    一向 (楼主)
    2020-11-22 14:03

    You may have used built-in name 'list' for a variable in your code. If you are using Jupyter notebook, sometimes even if you change the name of that variable from 'list' to something different and rerun that cell, you may still get the error. In this case you need to restart the Kernal. In order to make sure that the name has change, click on the word 'list' when you are creating a list object and press Shift+Tab, and check if Docstring shows it as an empty list.

提交回复
热议问题