how to use string endswith in python