Python indentation

In python, there are two ways of indentation: tab or spaces(4 spaces).

However, I use WingIde, Visual Studio Code and Atom editor alternatively (do not ask why) depends on my purposes. And they are not consistently on how to indentify Python file.

Well, long story short, I use Wingide to normalize the format of python file and by chance, it changes the location of my return statement

This is the “problem” one:


I took me more than a few days to reconigize the mistake while the return value is only 1 item no matter what i enter! and debug of course.

The correct version is


Thanks god.


Lesson learnt:

  1. use only one editor if it is possible (not for me)
  2. do not mess with format if it works
  3. Be careful

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s