Sonia has a list called colleges with 10 entries and wants to print the final item on the list. Which code should be used?

1 answer

To print the final item on the list, you can use the indexing feature of Python by accessing the last element using the index `-1`.

Here's the code you should use:

```python
colleges = ["college1", "college2", "college3", "college4", "college5", "college6", "college7", "college8", "college9", "college10"]
print(colleges[-1])
```

This will output the final item in the list, which in this case is `"college10"`.