在另一个脚本中,我正在创建接口,如果'totalCars‘的答案大于零,则继续提供一种类型的汽车。然而,当我这样做的时候,我得到了这个错误:TypeError: '>' not supported between instances of 'method' and 'int'。self.getElectricCars()) h = len(self.getHybridCars())
在我的代码中,这个错误总是出现在左边、右边和中间。这真的很烦人。到目前为止,我已经把它们都修好了,但我似乎不能修好这一个。(most recent call last):if (number > 1):
TypeError: '>' not supported between instances of 'str' and 'i