if index not in list python