fork(2) download
  1. def prime_replace(x, l = []):
  2. lst = []
  3. string = str(x)
  4. for n in range(10):
  5. newstr = string
  6. for i in l:
  7. newstr = newstr.replace(string[i], str(n))
  8. lst.append(int(newstr))
  9. return lst
  10.  
  11. print prime_replace(x = 56243, l = [2, 3])
Success #stdin #stdout 0s 23352KB
stdin
Standard input is empty
stdout
[56003, 56113, 56223, 56333, 56443, 56553, 56663, 56773, 56883, 56993]