Python print函數用法,print 格式化輸出

使用print輸出各型的 python 字符串 整數 浮點數 出度及精度控制 strHello = 'Hello Python' print strHello #輸出結果:Hello Python #直接出字符串 1.格式化輸出整數 python print也支持參數格式化,與C言的printf似, 函數 strHello = "the length of (%s) is %d" %('Hell
相關文章
相關標籤/搜索