Solution Review: Find Index of a Specific Value in a String
Use the built-in string function
string.find(character) to find the index of a specific character in a string; this returns the index of the input character or string
str = "Python Programming"
character = "y"
The following Python code demonstrates how to find the index of a specific value in a string.