I dont understand how the answer is 3 . a>b - i am not sure how are they comparing ( whether taking the sum of all the list ite | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

I dont understand how the answer is 3 . a>b - i am not sure how are they comparing ( whether taking the sum of all the list ite

a = [7,3,9,5] b = [8,0,4] if a > b : print(len(a)) else: print(len(b))

25th Oct 2020, 7:01 AM
Curious Ant
Curious Ant - avatar
2 ответов
+ 3
They are compared based on comparison between each element just like how strings are compared 7>8 is compared first which returns false ,if both had 8 and 8 as first element than 3 and 0 would be compared
25th Oct 2020, 7:07 AM
Abhay
Abhay - avatar
+ 1
oh thankyou so much !
25th Oct 2020, 7:08 AM
Curious Ant
Curious Ant - avatar