`names[-1]` will work here, you don't need `len(names)`.