0
How can I use method replece on python?
I want to show the next output, for example, I have variable = travel, I want it to show me t,r,a,v,e,l Help, please!!
3 Respostas
+ 3
Whilst I agree with Lothar about the importance of posting your attempt, I also remember my own struggles learning this concept.
So:
variable = 'travel'
print(variable.replace('',','))
As you can see, your variable is followed by the method with 2 arguments.
The 2nd argument replaces the first argument
+ 9
Julio Carrillo , to get help from the community, you should have done a try by yourself first. Please put your code in playground and link it here. Thanks!
0
https://code.sololearn.com/cJ2HeN6PuiTG/?ref=app
How do I have to do in this case? Because I have two variable.