Project Euler 38: Pandigital Multiples
Checking if len(num) &gt;= 5 is redundant because you only call the function with k &lt; 10**5
Instead of sorted([int(x) for x in num]) you could compute just sorted(num) and compare that to a DIGITS = [str(i) for i in range(1, 10)] constant that you can compute outside the function.
Most of the multiples end up longer than 9 digits. Testing len(num) == 9 before sorting the digits should be faster.
You could take advantage of the example 918273645 provided in the problem statement. The number you are looking for must be greater or equal to that. For one thing, the first two digits must be in range 91 to 98, which is a small fraction of all the two-digit numbers you try.