Search code examples
pythonconsolespyderindentation

How to fix indentation / tab issue on Spyder


I'm trying to get the python shell to display this print statement without the large gap at the backslash. I have already tried going into Source > Fix indentation.

    print('\nAverage median \
           income in {:2s}: ${:<10,.2f}'.format(state, income))
Average median        income in MI: $51,601.37

Any guidance helps, thanks!


Solution

  • Try removing the tab before 'income' in ur code print('\nAverage median \income in {:2s}: ${:<10,.2f}'.format(state, income))