we can use replace() method .
x= "ABCDD"
print(x.replace('A',''))
Also we can pass a substring to replace it .
python code: t=int(input()) while t: t=t-1; x=input(); stack=[] for a in x: stack.append(a) if len(stack)==0 else stack.p...
No comments:
Post a Comment