Here's the answer:
“la esperanza es lo último que se pierde”
Watch a real native speaker say it:
Here's how it sounds in a textbook:
You could also say:
- lo último que se pierde es la esperanza
Fun fact: the hundreds of thousands of people learning Spanish with Memrise get this phrase correct 92.26% of the time!