I'm pretty sure that python 2.7 allows mixed tabs and spaces (not that it is recommended) but python 3.x will error if you try that.
PEP 8 recommends spaces, but you can use tabs if that's what a project already uses. python.org/dev/peps/pep-0008/#tabs...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Bence,
Python doesn't support mixing tabs and spaces for indentation.
For other languages as well we should stick to one thing, either tab or spaces. This is because of different editors display tabs/spaces differently.
Thanks for the reply. So I can use tabs or spaces as well but not in the same code, right?
Correct.
I'm pretty sure that python 2.7 allows mixed tabs and spaces (not that it is recommended) but python 3.x will error if you try that.
PEP 8 recommends spaces, but you can use tabs if that's what a project already uses.
python.org/dev/peps/pep-0008/#tabs...