+ 1

Replace

g = "hi" g.replace("i","h") print (g) How to replace it ? đŸ€”

9th Mar 2022, 4:08 PM
Shai Shab
Shai Shab - avatar
3 Answers
+ 3
g = "hi" g=g.replace("i","h") print(g)
9th Mar 2022, 4:13 PM
Jayakrishna 🇼🇳
+ 2
Do you want its meaning.. ? g.replace("i", "h") replaces i with h so g="hh" and next ("hh").replace("h","i") replaces h with i so output g = "ii"
9th Mar 2022, 4:56 PM
Jayakrishna 🇼🇳
+ 1
Jayakrishna🇼🇳 and 2 replace ? g = g.replace("i","h").replace ("h","i")
9th Mar 2022, 4:19 PM
Shai Shab
Shai Shab - avatar