《笨辦法學python》筆記(完結)

打印: %r %r 與 %s 的區別就比如 repr() 函數處理對象與 str() 函數處理對象的差異。 %s => str(),比較智能 %r => repr(),處理較爲簡單和直接 html from datetime import datetime s = "world" print("hello %s (str)" %s) print("hello %r (repr)" %s) ti
相關文章
相關標籤/搜索