0
How do we replace a character in a string with some other ?
eg. We have string "This is String". Now if we want to replace "S" with "
#x27;. and want to receive "This. Is $tring" as output. How can we do this ??2 Respostas
+ 3
string="this is string"
print(string.split()[0]+" "+string.split()[1] +" ",end="")
print(string.split()[2].replace("s","quot;))