Print the index of the character in a string.

In this program, we will take a string as input and print the index of the character in a string.

Steps to solve the program
  1. Take a string as input.
  2. Find the index of the given character using index().
  3. Print the output.
				
					#Input string
string = "Sqatools"

#Printing output
print("The index of q is: ",string.index("q"))
				
			

Output :

				
					The index of q is:  1
				
			

find all substring frequencies in a string.

strip spaces from a string.

Leave a Comment