uplalgo
2019年5月15日 星期三
print 之 format
for i in range(5):
print("{:<10}".format("*")) #空格10 向左靠齊
print("{:>10}".format("*")) #空格10 向靠齊
print("{:^10}".format("*")) #空格10 向中靠齊
===========
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言