As an exercise, describe the relationship
between string.join(string.split(song)) and song.
(they both refer to a string)
Are they the same for all strings? When would they be different?
I am a little ashamed to ask such a question for a likely simple question but,
I don’t get it, what is/are the exception(s)? when are they are different?
By default the
splitmethod groups consecutive delimiters together, so if you have them in your original string they’ll be lost:However, if you specify delimiters to split on then consecutive delimiters are not grouped so you can keep the strings the same: