I was creating a function about replacing multiple part of a string with multiple number but for some reason, the output is not what i expected.
from pyprimes import isprime
def prime_replace(x, l = []):
    lst = []
    string = str(x)
    for n in range(10):
        for i in l:
            string = string.replace(string[i], str(n))
        lst.append(int(string))
    return lst 
print prime_replace(x = 56243, l = [2, 3])
The output of this function is a list [56003, 56113, 56223, 56333, 56444, 56555, 66666, 77777, 88888, 99999] but what i wanted is [56003, 56113, 56223, 56333, 56443, 56553, 56663, 56773, 56883, 56993] Can someone help me with this and tell me what went wrong, thank you.