Dec-26-2018, 10:10 PM
(This post was last modified: Dec-26-2018, 10:10 PM by cybervigilante.)
import string dogs = "All.Good,Dogs.. Eat.! Shoes?" dogs = dogs.strip(string.punctuation) print(dogs)My result is All.Good,Dogs.. Eat.! Shoes
with no punctuation removed. Correction: The ? disappeared but I thought all punctuation would go.