[Python] Easy to understand
The trick is to generate all the possible string for hour and minutes and then find the ones that match the giving pattern.\n\n\nclass Solution:\n    def countT
The trick is to generate all the possible string for hour and minutes and then find the ones that match the giving pattern.\n\n```\nclass Solution:\n    def countTime(self, time: str) -> int:\n        \n        ## generate all possible string for hour and minutes \n        hr_str_all = [f"{h:02}" for h in range(24)]\n        min_str_all = [f"{m:02}" for m in range(60)]\n        \n        ## generate pattern\n        hr_pattern = time.split(":")[0].replace("?", "\\d")\n        min_pattern = time.split(":")[1].replace("?", "\\d")\n\n        ## find matchs\n        hr_num = len([h for h in hr_str_all if re.match(hr_pattern, h)])\n        min_num = len([m for m in min_str_all if re.match(min_pattern, m)])\n        \n        return hr_num * min_num\n```
['Python']