What happens? python cities = ['Islamabad', 'Karachi', 'Lahore'] print(cities[3])
- Islamabad
- IndexError
- Lahore
- None
Answer
B) IndexError
Indexes are 0, 1, 2 — index 3 is out of range. cities[-1] or cities[2] gives Lahore. SLO CS-11-C-05 · Application
Computer Science MCQ · More Unit 3: Programming Fundamentals MCQs · Practise