How can we use comparison operators with list? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can we use comparison operators with list?

I have these 2 lists: a = [7,3,9,5] b=[8,0,4] when i print(a>b) it returns false, although len(a) is greater than len(b). The question here, what does this comparison depend on,and how can I determine which one is >,< or = the other one. I'll be glad if someone provided a good explanation of this 🙏

8th May 2021, 3:05 AM
Alaa Aldeen Shammr
Alaa Aldeen Shammr - avatar
1 Answer
+ 1
Jan Markus Thank you very much I do appreciate your help
8th May 2021, 4:30 AM
Alaa Aldeen Shammr
Alaa Aldeen Shammr - avatar