- 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
2 odpowiedzi
+ 1
print("the ".join("a fruit. a vegetable. a drink".split("a ")))
+ 2
Where's your attempt buddy?