How to switch tab into space

Hello everyone!

I am programing python, And I want to switch tab automatically into space, because when my code is in terminal, tab is very wide. Thanks!

If that’s your reason, I suggest changing the display width of a tab in your terminal.

For the actual question, do you mean the source is using tabs, or the output is printing with tabs? What does the terminal have to do with it?