📜  TypeError:“方法”对象不可下标 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:46.035000             🧑  作者: Mango

代码示例2
The “TypeError: 'method' object is not subscriptable” error is raised when you use square brackets [] to call a method inside a class. To solve this error, make sure that you only call methods of a class using curly brackets () after the name of the method you want to call.