我试图构建一个简单而基本的代码,看看在游戏中我的荣耀将持续多少天,然后当我尝试运行这个python时,抛出这个错误。TypeError: '>=' not supported between instances of 'tuple' and 'int'
我在python上检查了我的版本,因为我正在使用Visual,根据我所知道的最新版本3.7.7,然后我在python ide上尝试了3.4.4,并将相同的
我一直收到以下错误:TypeError: '<' not supported between instances of 'set' and 'tuple',我不知道为什么?这是我的代码:
print(reduce(lambda x,y: x<y, set(list(map(tuple,list1))), set(list(map(tuple,list2)))))
然而,我得到了这个错误: TypeError: '<' not supported between instances of 'int' and 'list' 这将运行: 3 < all([4,5])但不会产生正确的答案,因为3大于True,True。如果这是重复的,我很抱歉,但是我在SO上找到的6个例子中,没有一个回答了我的问题。奇怪的是,我觉得我在过去成功地使用了它,没有出现任何问题。我在Mac