For Loop Inside While Loop Python 3