Code Room
Code reviewMedium
Question
Review this Python validator called once per inbound request to check an email-like field.
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.
Learn the concepts
import re def is_valid_handle(value: str) -> bool: pattern = re.compile(r"^[a-z0-9]([a-z0-9._-]{0,28}[a-z0-9])?$") return pattern.match(value) is not NoneRun or narrate your approach, then ask the coach.