Tokenize a string: Difference between revisions

→‎{{header|Python}}: Removed the one-liner as it does not store the intermediate list of words; and the last example as it does not work!
(→‎{{header|Python}}: Removed the one-liner as it does not store the intermediate list of words; and the last example as it does not work!)
Line 908:
tokens = text.split(',')
print '.'.join(tokens)</lang>
 
or the one liner
 
<lang python>print '.'.join('Hello,How,Are,You,Today'.split(','))</lang>
 
<lang python>i = split("Hello,How,Are,You,Today")
for a in i:
print i+"."
</lang>
 
=={{header|R}}==
Anonymous user