結果 : generate the following pattern using nested loop in python