Code Room
Code reviewMediumcr-g466
Subject CorrectnessLevel Mid–Senior~16 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Python validator that checks a username is exactly lowercase letters and digits, 3–16 chars.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewpython
import rePATTERN = re.compile(r"[a-z0-9]{3,16}") def valid_username(name: str) -> bool:    return bool(PATTERN.match(name))
Run or narrate your approach, then ask the coach.