Black Lives Matter. Please consider donating to Black Girls Code today.

Removing the last data point in python

Hello. I have a function in python where it should delete that last trace in the graph. How would I be able to do this?