# Given scores = [88, 92, 75, 95, 83, 90, 87], print the last 3 scores using a negative-index slice

Canonical URL: <https://datadriven.io/problems/given-scores-88-92-75-95-83-90-87-print-the-last-ff50b628>

Domain: Python · Difficulty: medium

## Problem

Given scores = [88, 92, 75, 95, 83, 90, 87], print the last 3 scores using a negative-index slice. Then print all scores except the last 2 by omitting the start and using a negative end index.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/given-scores-88-92-75-95-83-90-87-print-the-last-ff50b628)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.