diff --git a/ch04-strings-and-string-methods/8-find-a-string-in-a-string.py b/ch04-strings-and-string-methods/8-find-a-string-in-a-string.py index 024ba62..99fc587 100644 --- a/ch04-strings-and-string-methods/8-find-a-string-in-a-string.py +++ b/ch04-strings-and-string-methods/8-find-a-string-in-a-string.py @@ -8,13 +8,9 @@ # Exercise 2 -# Replace every occurrence of the character `"s"` -# with the character `"x"` -phrase = "Somebody said something to Samantha." -phrase = phrase.replace("s", "x") -print(phrase) -# NOTE: This leaves the capital "S" unchanged, so the -# output will be "Somebody xaid xomething to Samantha." +#Find value 2.0 in user input +my_input = input("Enter your input") +print(my_input.find("2.0")) # Exercise 3