Skip to content

Instantly share code, notes, and snippets.

@hbisneto
Created October 9, 2023 15:43
Show Gist options
  • Save hbisneto/8ebdd71542ed74e74ae5987f64dbd76f to your computer and use it in GitHub Desktop.
Save hbisneto/8ebdd71542ed74e74ae5987f64dbd76f to your computer and use it in GitHub Desktop.
Python String Replace
string = "Let kids play outside without adult supervision?"
new_string = string.replace("without", "with")
new_string = new_string.replace("?","!")
print(new_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment