开发者

Modify the width of a tab in a format string

开发者 https://www.devze.com 2023-04-10 04:38 出处:网络
Is it possible to redefine the space width of a tab when printing a \\t character in python开发者_StackOverflow?Try pydoc string.expandtabs, I think it will do what you want.Python\'s print feature do

Is it possible to redefine the space width of a tab when printing a \t character in python开发者_StackOverflow?


Try pydoc string.expandtabs, I think it will do what you want.


Python's print feature does not convert tabs to spaces - it outputs a literal tab. The way it appears depends on what program you use to view it.

0

精彩评论

暂无评论...
验证码 换一张
取 消