sd1 = ‘what we think, we become’
print(‘#######first replace statement######’)
sd1.replace(‘we’,‘you’) # first statement
print(‘######second replace statement######’)
sd1.replace(‘we’,‘you’,1) # second statement
Output of the program :
#######first replace statement######
######second replace statement######
‘what you think, we become’
first replace method output is not printed but second replace method is printed why it so? correct me if I am wrong