بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
In the name of Allah, the Most Beneficient, the Most Merciful
So the story is I copied (and pasted) some python code from one of the lectures that I attended into my python source code, but somehow it didn’t work (!!!). I am really sure that the algorithm and syntax was fine! It was weird! And after a few searches in Google, I finally found out the culprit: the hard-tab usages!
So it turns out that it is recommended for us not to use the hard tab in our source code. Why? Because each text editor might have a different tab-to-space convertion rule, and it will eventually bites the indentation-sensitive programming languages like Python (see here and here for more explanation). So it is better for us to use soft-tab (space) in our Python source code (with each tab equals to 4 spaces).
Alright then. Lesson learned.