Nzec Runtime Error In Python
This code works fine in my system. However, when i ran in in an online compiler+ debugger, it gave me a runtime(NZEC) error saying indentation in line4:if a.index(min(a)) is wrong.
Solution 1:
It looks like your code mixes tabs and spaces. That's legal in Python 2, but a very bad idea (it has become an error in Python 3). I suspect that the online interpreter you're running the code in is taking a stricter view, and considering it an error. It probably sees something similar to what Stack Overflow sees (your code didn't copy correctly into your question either).
You can troubleshoot the issue by running the Python interpreter with the -t
flag which will emit a warning any time there's inconsistent tab usage, or -tt
to make it an error. Many text editors have tools that will convert tabs to spaces which can help to fix the issue.
Post a Comment for "Nzec Runtime Error In Python"