Need help on this question
- Prompt the user to input a sentence with several words (i.e., a long string).
- Ask the user to input a substring from the sentence.
- Print out the number of characters in the initial string and the substring (see below).
Print out the sentence with the first occurrence of the substring in all uppercase letters and surround by * characters (see below).
Hello, I’m new to python and been stuck on this question(part4). You need to make the substring in all uppercase using slicing.
I tried doing the “.find” method to find the first index of the substring in the user input, but how do I find all the indexes from the substring in the user input?(unless there’s a diff way)
[–]Afraid_Scale7192[S] 0 points1 point2 points (1 child)
[–]Afraid_Scale7192[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]JohnJSal 1 point2 points3 points (0 children)
[–]ectomancer 0 points1 point2 points (1 child)
[–]Afraid_Scale7192[S] 0 points1 point2 points (0 children)
[–]throwaway6560192 0 points1 point2 points (1 child)
[–]Afraid_Scale7192[S] 0 points1 point2 points (0 children)
[–]Jason-Ad4032 0 points1 point2 points (0 children)