<p>An&nbsp;integer has <em>sequential digits</em> if and only if each digit in the number is one more than the previous digit.</p>

<p>Return a <strong>sorted</strong> list of all the integers&nbsp;in the range <code>[low, high]</code>&nbsp;inclusive that have sequential digits.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> low = 100, high = 300
<strong>Output:</strong> [123,234]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> low = 1000, high = 13000
<strong>Output:</strong> [1234,2345,3456,4567,5678,6789,12345]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>10 &lt;= low &lt;= high &lt;= 10^9</code></li>
</ul>

class Solution:
    def sequentialDigits(self, low: int, high: int) -> List[int]:
        res = []
        #has to be between len(str(low)) digits and len(str(high)) digits

        for i in range(len(str(low)), len(str(high))+1):
            temp = "".join([str(j) for j in range(1,i+1)])
            prev = "".join([str(j) for j in range(1,i+1)])
            if int(temp) >= low and int(temp) <= high:
                res.append(int(temp))
            while int(temp) <= high and len(prev) == len(temp):
                prev = temp
                temp = "".join([str(int(i)+1) for i in temp])
                if int(temp) >= low and int(temp) <= high and len(prev) == len(temp):
                    res.append(int(temp))
        return res
16400