使用 mako 格式化
有人知道如何用 Mako 格式化字符串的长度吗?
相当于 print "%20s%10s" % ("string 1", "string 2")?
Anyone know how to format the length of a string with Mako?
The equivalent of print "%20s%10s" % ("string 1", "string 2")?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 mako 中相当轻松地使用 python 的字符串格式
:
you can use python's string formatting fairly easily in mako
giving: