What is the output? python nums = [4, 8, 15, 16] print(nums[-1])
- 15
- 16
- 4
- Error
Answer
B) 16
Negative indexes count from the end; -1 is the last item. SLO CS-11-C-05 · Application
Computer Science MCQ · More Unit 3: Programming Fundamentals MCQs · Practise