Why Does Python Use a Leading Underscore for Some Variables?
The article explains that a leading underscore in Python names signals a non‑public or internal use convention defined by PEP 8, describes its practical effects on imports and IDE hints, and outlines other underscore naming patterns such as name mangling, trailing underscores, magic methods, and throwaway variables.
