Pattern Question In Python Using While Loop