Using pre-commit hooks to Keep Python code clean with black, flake8 and isort
Automate code formatting task with pre-commit framework. (more…)
Read more »If you try to mutate a sequence while traversing through it, Python usually doesn’t complain. For example: # src.py l = [3, 4, 56, 7, 10, 9, 6, 5] for i in l: if not i % 2 == 0: continue l.remove(i) print(l) The above snippet iterates through a list … Read more