Skip to content

Use of lowercase "L" as a variable #588

@bcatalfo

Description

@bcatalfo

According to PEP 8

Never use the characters ‘l’ (lowercase letter el), ‘O’ (uppercase letter oh), or ‘I’ (uppercase letter eye) as single character variable names. In some fonts, these characters are indistinguishable from the numerals one and zero. When tempted to use ‘l’, use ‘L’ instead.

However several of these solutions use lowercase 'l' usually as a "left" pointer in conjunction with a "right" pointer indicated by 'r'. Personally I would recommend changing these to "L" and "R" but really anything is okay as long as it isn't "l" as it is very confusing. Examples of problems that use this are 424-Longest-Repeating-Character-Replacement and 647-Palindromic-Substrings.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions