You are viewing a single comment's thread. Return to all comments →
def mutate_string(string, position, character):
q = list(string) q[position] = f'{character}' length = len(q) ss = "" x=0 def concatinate(): nonlocal q nonlocal x nonlocal ss if x < length : ss+= str(q[x]) x+=1 return concatinate() concatinate() print(ss)
mutate_string("eerwewewe232xz",8,"%@#!")
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Mutations
You are viewing a single comment's thread. Return to all comments →
def mutate_string(string, position, character):
mutate_string("eerwewewe232xz",8,"%@#!")