While Loop And If Statement Python String Split To List