TypeError: unhashable type: 'list' in Python: 10 Causes and Fixes for Dict Keys, Sets, Counter and lru_cache (Tested Examples)Python raises TypeError: unhashable type: 'list' when you use a list where Python needs a hashable value: as a dictionary key, as an element of a set, in an in check against a set or dict, or as an ar16 min read·mfaysaldev.hashnode.devNov 10
git fetch vs git pull (vs git pull --rebase): Differences, Divergent Branches and When to Use Each (Tested Examples)git fetch downloads new commits, branches and tags from a remote and updates your remote-tracking branches (like origin/main), but it never touches your local branch or your working files. git pull ru14 min read·mfaysaldev.hashnode.devNov 9
null vs undefined in JavaScript: Differences, Checks and When to Use Each (Tested Examples)undefined means a value was never assigned (missing property, missing argument, bare return). null is an intentional empty value you assign yourself. Prefer === when you care which one you have, use =12 min read·mfaysaldev.hashnode.devNov 9
Python Assignment vs Shallow Copy vs Deep Copy (copy vs deepcopy): Differences, Nested Lists and When to Use Each (Tested Examples)In Python, b = a does not copy anything: it gives the same object a second name, so a change through one name shows up in the other. A shallow copy (a.copy(), a[:], list(a), dict(a) or copy.copy(a)) c16 min read·mfaysaldev.hashnode.devNov 9
UnboundLocalError: cannot access local variable where it is not associated with a value in Python: 10 Causes and Fixes (Tested Examples)Python raises UnboundLocalError: cannot access local variable 'x' where it is not associated with a value when a function reads a name that Python has decided is local to that function, but the line t16 min read·mfaysaldev.hashnode.devNov 9