Python replace, I have a question!

Asked 2 weeks ago, Updated 2 weeks ago, 3 views


A= "Oh, I really want to eat 'crunchy' \"jeon\"."


C=B.replace(B), 'Brown'



When you print out a C, 'Yellow' 'Yellow' Shouldn't it come out as? I'm asking because I don't know what's wrong.

python function string replace

2022-09-20 15:03

1 Answers

The replace command replaces a string that matches the condition, not a command that adds a string.

2022-09-20 15:03

If you have any answers or tips

© 2022 pinfo. All rights reserved.