0

Would this print the number three nums=list(range(5) print(nums[4])

19th Apr 2017, 8:10 PM
Will
Will - avatar
4 Antworten
+ 2
actually it would be a syntax error
19th Apr 2017, 9:14 PM
Edward
+ 1
It's 4. because nums=list(range(5)) Values ==> [0,1,2,3, 4] Index ==> 0,1,2,3,(4) Print(nums[4]) ==> 4
23rd Apr 2017, 7:29 PM
José Manuel Yáñez Zaraza
0
no it would print 4
19th Apr 2017, 9:10 PM
mahmoud
mahmoud - avatar
0
You omitted a closing parenthesis ")" Then, syntax error, haha
18th May 2017, 7:28 AM
Wilson Law
Wilson Law - avatar