I would like to turn everything into a lowercase but no matter what i try it always brings back "AttributeError: 'list' object has no attribute 'lower'" what am i doing wrong?
user_input = input("")
prohibited = {'this','although','and','as','because','but','even if','he','and','however','an','a','is','what','question :','question','[',']',',','cosmos',' ',' ',' ','cosmo'}
tokens = [word for word in re.split("\W+", user_input) if word.lower() not in prohibited]
tokens.sort(key=len, reverse=True)
words = str(tokens).split()
TokenCount = len(words)
tokens = tokens.lower()
loweris a string method.tokensis a list of strings.tokens=list(map(lambda x:x.lower(),tokens))