CJCoding With Joseph
15free / daySign inCreate account
← Back to Question List
Python Code Walkthrough #25

Negative Indexes

easyLists

📄 Code

Read carefully — what does this print?
1names: list[str] = ['Ann', 'Bo', 'Cy', 'Di']
2print(names[-1])
3print(names[-2])
4print(names[1:-1])
5print(names[-1][0])

🎯 Your Answer