Python中支援字串格式化,其基本形式如下: str = "I'm %s, %s years old." % ('jack', 19) print(str) #結果: I'm jack, 19 years old.
確定! 回上一頁