Created
October 9, 2023 15:43
-
-
Save hbisneto/8ebdd71542ed74e74ae5987f64dbd76f to your computer and use it in GitHub Desktop.
Python String Replace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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