← Code LabPython0/50 solved · 0%
Strings · medium

27. Regular expressions

Validate patterns with re.

Write `is_valid_address(addr)` returning `True` if `addr` matches `0x` followed by exactly 40 hex characters, else `False`. Use the `re` module.
Required in your answer: re.match0x[a-fA-F0-9]{40}