1# Runtime: 41 ms (Top 43.2%) | Memory: 16.29 MB (Top 65.6%)234class Solution:5def sequentialDigits(self, low: int, high: int) -> List[int]:6l = len(str(low))7h = len(str(high))8ans = []9for i in range(l, h + 1):10for j in range(1, 11 - i):11t = str(j)12for k in range(i - 1):13t += str(int(t[-1]) + 1)14if int(t) <= high and int(t) >= low:15ans.append(int(t))16ans.sort()17return ans