How i can do in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How i can do in python?

x=('mango') I want to remove g from mango without use index method how i can do that.

10th Apr 2018, 7:22 AM
Maninder $ingh
Maninder $ingh - avatar
1 Answer
+ 5
The shortest way is to use a replace method. >>> x = 'mango' >>> x.replace('g','') 'mano'
10th Apr 2018, 7:33 AM
strawdog
strawdog - avatar