在Python 中若要要求字串輸出格式時就必須使用字串的格式化,其方法有兩種: ... print('%f' % (3.14159)) print('{:f}'.format(3.14159)) #新的寫法.
確定! 回上一頁