Reusing the name of a builtin function for a local variable is technically permitted by Python, but is considered extremely bad practice, to the point where if you were to do this in an interview after advertising yourself as a Python programmer, it would likely disqualify you.
This came to my attention via SO: https://stackoverflow.com/questions/75564166/what-is-shadow-built-in-name-sum and seemed so bad for something that's intended as a guide for beginners that I felt it was important to come and give feedback. My recommendation would be to run all the code in this book through a standard linter; my guess is that other issues will come to light and it will be a simple matter to fix them.
Data-Structures-and-Algorithms-The-Complete-Masterclass/1. Big O Notation/2 - bigo-whileloop.py
Line 11 in fe6e525
Reusing the name of a builtin function for a local variable is technically permitted by Python, but is considered extremely bad practice, to the point where if you were to do this in an interview after advertising yourself as a Python programmer, it would likely disqualify you.
This came to my attention via SO: https://stackoverflow.com/questions/75564166/what-is-shadow-built-in-name-sum and seemed so bad for something that's intended as a guide for beginners that I felt it was important to come and give feedback. My recommendation would be to run all the code in this book through a standard linter; my guess is that other issues will come to light and it will be a simple matter to fix them.