LPC
2019年5月2日 星期四
print format 格式化輸出
====二進制
a=3
print("{:b}".format(a))
====8進制
a=13
print("{:o}".format(a))
====十六進制
a=133
print("{:x}".format(a))
from https://www.cnblogs.com/fat39/p/7159881.html
http://www.runoob.com/python/att-string-format.html
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言