I'm trying to analyze the contents of a string. If it has a punctuation mixed in the word I want to replace them with spaces.
For example, If Johnny.Appleseed!is:a*good&farmer is entered as an input then it should say there are 6 words, but my code only sees it as 0 words. I'm not sure how to remove an incorrect character.
FYI: I'm using python 3, also I can't import any libraries
string = input("type something")
stringss = string.split()
    for c in range(len(stringss)):
        for d in stringss[c]:
            if(stringss[c][d].isalnum != True):
                #something that removes stringss[c][d]
                total+=1
print("words: "+ str(total))
 
     
     
     
     
     
     
     
     
    