擅长:python、mysql、java
<p><code>str.ljust(width, [fillchar=" "])</code>(<a href="http://docs.python.org/2/library/stdtypes.html#str.ljust" rel="nofollow">http://docs.python.org/2/library/stdtypes.html#str.ljust</a>)似乎是你想要的。
打印到最大长度+一点点时,左对齐每个字段。</p>
<p>对于与示例匹配的最后一个字段,您需要使用rjust来右对齐它。</p>