fix: Tweak in comments to better explain the original ask around rules

in '25, day2
This commit is contained in:
FaultyBranches 2025-12-02 08:24:01 -06:00
parent c936d7d573
commit 79b145acc4

View File

@ -24,11 +24,11 @@ def part2(range_list: list) -> int:
return total return total
def check_valid_id(id: str) -> bool: def check_valid_id(id: str) -> bool:
'''Checks a given ID for validity using the silly rules''' '''Checks a given ID for validity using the silly rules, only one repeat'''
return re.fullmatch(r'(.*?)\1', id) is None return re.fullmatch(r'(.*?)\1', id) is None
def check_extended_id(id: str) -> bool: def check_extended_id(id: str) -> bool:
'''Checks for extended rule checking, at least two repeats''' '''Checks for extended rule checking, at least one repeats'''
return re.fullmatch(r'(.*?)\1+', id) is None return re.fullmatch(r'(.*?)\1+', id) is None
def main(): def main():