Psst: you can also use the split() function to split file into a list and use its last item.
split()
file