I would like to put a comma before all words in title case. For that I tried with tokens:
text="Hey, I would like To Have a chocolate CAKE"
tokens=word_tokenize(text)
for word in tokens:
if word.istitle():
word="," + word
But nothing changes in tokens
. Why?