how replace the word at a position in string with _and later use the previous word...plz answer fast | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how replace the word at a position in string with _and later use the previous word...plz answer fast

27th Jun 2016, 4:33 PM
Nishant Sardana
Nishant Sardana - avatar
4 Answers
+ 2
a = 'abc' print(a.replace('c','C')) output : abC
27th Jun 2016, 5:00 PM
Pyer
Pyer - avatar
+ 1
By copying his content in other variable
27th Jun 2016, 5:18 PM
Kerbin Santiago Díaz Rivas
Kerbin Santiago Díaz Rivas - avatar
0
but this will replace word...wholly..how to use previous word again
27th Jun 2016, 5:01 PM
Nishant Sardana
Nishant Sardana - avatar
0
a='abc' b=a then replace value in string a
28th Jun 2016, 4:10 AM
Anandaprakash S