+ 1

python

If num is a list variable with five elements, which print statement will output the last element of the list?

8th Mar 2018, 5:56 PM
barbara makgano mamabolo
barbara makgano mamabolo - avatar
2 ответов
+ 8
If you want the last of a list yet don't know how big it is: print(num[-1])
8th Mar 2018, 6:14 PM
John Wells
John Wells - avatar
+ 4
print(num[4])
8th Mar 2018, 6:08 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar