Trở về đầu
Hãy tìm kiếm và thay thế các từ "ong" thành "con ong ngoan"
Mời các bạn download tại: Click here
"""
Thay the tu "ong" thanh "con ong ngoan"
"""
def insert2(s11, index, s22):
for i2 in range(len(s22)-1, -1, -1):
s11.insert(index, s22[i2])
s = "ong vang lon ton den nha ong nau choi"
length = len(s)
s2 = list(s)
for x in s2:
print(x, end='')
print()
for i in range(length - 3, -1, -1):
if s[i:i+3] == "ong":
del s2[i:i+3]
insert2(s2, i, "con ong ngoan")
for x in s2:
print(x, end='')