fork 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[0:i]+str(n)+newstr[i+1:];
  8.  
  9. lst.append(int(newstr))
  10. return lst
  11.  
  12. print prime_replace(x = 56243, l = [2, 3])
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
[56003, 56113, 56223, 56333, 56443, 56553, 56663, 56773, 56883, 56993]