Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
comparison in lists
#3
The error message is self explanatory
Quote:TypeError: '>' not supported between instances of 'int' and 'list'
This happens when maior is zero and lista1[1] is a list (according to this line print(lista1[1]) # 38 88 11). Print both to answer the question yourself.
if lista1[1] > maior:
Reply


Messages In This Thread
comparison in lists - by Renatoluz - May-10-2019, 06:06 PM
RE: comparison in lists - by Yoriz - May-10-2019, 06:56 PM
RE: comparison in lists - by woooee - May-10-2019, 10:07 PM
RE: comparison in lists - by Renatoluz - May-11-2019, 12:50 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020