Remove punctuations from a string

In this program, we will take a string as input and remove punctuations from a string.

Steps to solve the program
  1. Take a string as input.
  2. Create an empty string and a string containing all the punctuations.
  3. Use for loop to iterate over every character from the input string.
  4. If the character is not in the list containing punctuations then add that character to the empty string.
  5. Print the output.

Output :

remove empty spaces from a list of strings.

find duplicate characters in a string

Leave a Comment