Tokenize a string: Difference between revisions

Content added Content deleted
m (→‎[[Java]]: added a "." to fully comply with the specification)
Line 60: Line 60:


print '.'.join("Hello,How,Are,You,Today".split(','))
print '.'.join("Hello,How,Are,You,Today".split(','))

Or replace the '.' with '\n' and do:

print "\n".join("Hello,How,Are,You,Today".split(','))


==[[Ruby]]==
==[[Ruby]]==