+ 7
Please explain it
What is the output of this code. L= list(range(10)) print(L.pop() +max(L))
4 Answers
+ 14
L=list(range(10))
>>>
L
>>> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
L.pop()
>>>9
L
>>>[0, 1, 2, 3, 4, 5, 6, 7, 8]
max(L)
>>>8
9+8=17 and that is the answer.
+ 12
L gives you 0 - 9;
L.pop() method gives you last number - 9 and splice it so last value is now 8;
max(L) gives you now 8 (it's maximal value) ;
8 + 9 = 17
+ 12
Prometheus ĀÆ\_(ć)_/ĀÆ šøš¬ is faster than a speed of light :D
+ 9
Haha r8w9 I just patrol the Most Recent section frequently ;)