python string fix index