「%」是輸出控制字元。以上僅輸出結果1,2,3,若要在輸出結果套用文字說明,例如「a=1,b=2,c=3」,則可用「%」當作控制字元。請鍵入以下程式,並觀察輸出結果。
a, b, c = 1, 2, 3print("a=%d,b=%d,c=%d" % (a, b, c))
1 2 3