repl.it
@RyanCrouch/

def function (a, b, c, d,): e = 0 f = len(a) for g in

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
def function (a, b, c, d,):
  e = 0
  f = len(a)
  for  g in range(0, f):
    print(a[g])
    if(e < d and a[g] == b):
      e = e + 1
      a = a[:g] + c + a[g+1:]
  if e < d:
    a = a +(c * (d - e))
  return a
function()
Fetching token
?