[Python] Easy four nested loops and string comparison
python\nclass Solution:\n    def countTime(self, time: str) -> int:\n        h1 = range(3) if time[0] == \'?\' else [int(time[0])]\n        h2 = range(10) if ti
```python\nclass Solution:\n    def countTime(self, time: str) -> int:\n        h1 = range(3) if time[0] == \'?\' else [int(time[0])]\n        h2 = range(10) if time[1] == \'?\' else [int(time[1])]\n        m1 = range(6) if time[3] == \'?\' else [int(time[3])]\n        m2 = range(10) if time[4] == \'?\' else [int(time[4])]\n        total = 0\n        for h in h1:\n            for hh in h2:\n                for m in m1:\n                    for mm in m2:\n                        if f"{h}{hh}:{m}{mm}" <= "23:59":\n                            total += 1\n        return total\n```
['Python']