How To Check An Index In A String In Python