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
- use only one editor if it is possible (not for me)
- do not mess with format if it works
- Be careful