print 'there are {0:<10} students and {1:<10} teachers'.format(scnt, tcnt)
旧的
%运算符
-用于对齐,而新的
format方法使用
<和
>
欢迎分享,转载请注明来源:内存溢出
print 'there are {0:<10} students and {1:<10} teachers'.format(scnt, tcnt)
旧的
%运算符
-用于对齐,而新的
format方法使用
<和
>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)