Project Euler # 52 Permuted multiples in Python It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits,
but in a different order.

Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.

from time import time


def is_permutation(n1, n2):
    """returns True if n1 is permutation of n2"""
    if n1 == n2:
        return False
    str1 = str(n1)
    str2 = str(n2)
    digits1 = {digit: str1.count(digit) for digit in str1}
    digits2 = {digit: str2.count(digit) for digit in str2}
    if not digits1 == digits2:
        return False
    return True


def check_multiples(n, start=10):
    """checks 2x, 3x, 4x, 5x, 6x and returns the numbers if they are permutations."""
    for x1 in range(start, n):
        x2 = x1 * 2
        if is_permutation(x1, x2):
            x3 = x1 * 3
            if is_permutation(x2, x3):
                x4 = x1 * 4
                if is_permutation(x3, x4):
                    x5 = x1 * 5
                    if is_permutation(x4, x5):
                        x6 = x1 * 6
                        if is_permutation(x5, x6):
                            return x1, x2, x3, x4, x5, x6


if __name__ == '__main__':
    start_time = time()
    print(check_multiples(1000000, 125000)[0])
    print(f'Time: {time() - start_time} seconds.')
For the umpteenth time, do not write

if not digits1 == digits2:
    return False
return True


Do write

return digits1 == digits2

The magic number 125000 must be explained. Preferably in the code, not in comments.
Seven levels of indentation should be immediately seen as a big bright red flag, style wise. At least fold it into the loop.
Seven levels of indentation should be immediately seen as a big bright red flag, algorithm wise. How would you approach a question asking for 16, rather than 6, multiples? As a side note, if you continue with PE, you have a chance to encounter it.
Expanding on the bullet above, please take my advice and study some math. This problem does have a nice solution. Ponder on the fact that \$142857 * 7 = 1000000 - 1\$. An Euler's generalization of Fermat's Little theorem is a must. PE is very fond of it.

And stop brute forcing.