Change tab width in format bar

Is it possible to override tab space width when printing \t character in python?

+7
source share
2 answers

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

+13
source

The Python print function does not convert tabs to spaces - displays a literal tab. The way it is displayed depends on which program you use to view it.

+6
source

All Articles