Skip to content

ambiguous-variable-name (E741)#

Derived from the pycodestyle linter.

What it does#

Checks for the use of the characters 'l', 'O', or 'I' as variable names.

Why is this bad?#

In some fonts, these characters are indistinguishable from the numerals one and zero. When tempted to use 'l', use 'L' instead.

Example#

l = 0
O = 123
I = 42

Use instead:

L = 0
o = 123
i = 42