format 函数
Eg.九九乘法表
for i in range(1,10): for j in range(1,10): if i <= j: print format(i * j, '3'), print
for i in range(1,10): for j in range(1,10): if i >= j: print format(i * j, '3'), print
for i in range(1,10): for j in range(1,10): if i > j: print format(i * j, '3'), print
for i in range(1,10): for j in range(1,10): if i < j: print format(i * j, '3'), print