- 1

"a fruit. a vegetable. a drink" . Change the 'a' to 'the' without using replace function. And use split function

s= '''a fruit. a vegetable. a drink''' for a in s.split('a'): print(a,end=' ') I am stuck here. Don't know how to proceed further

15th Jul 2021, 2:02 PM
C_Vijay
2 Respostas
+ 1
print("the ".join("a fruit. a vegetable. a drink".split("a ")))
15th Jul 2021, 2:12 PM
Yes No
Yes No - avatar
+ 2
Where's your attempt buddy?
15th Jul 2021, 2:02 PM
minirkk
minirkk - avatar