Strip spaces from a string.

In this program, we will take a string as input and strip spaces from a string.

Steps to solve the program
  1. Take a string as input.
  2. Strip the spaces from a string using strip().
  3. Print the output.
				
					#Input string
string = "    sqaltoolspythonfun     "

#Printing output
print(string.strip())
				
			

Output :

				
					sqaltoolspythonfun
				
			

print the index of the character in a string.

check whether a string contains all letters of the alphabet or not.

Leave a Comment