What is the output? python nums = [4, 8, 15, 16] print(nums[-1])

  1. 15
  2. 16
  3. 4
  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