Why is it string.join(list) instead of list.join(string)?

This has always confused me. It seems like this would be nicer:

["Hello", "world"].join("-")

Than this:

"-".join(["Hello", "world"])

Is there a specific reason it is like this?

1
11

Leave a Comment