Joining Strings

  • Basically opposite of splitting strings
  • .join() in Python and JS
print(",".join(['Darryl', 'Mico', 'Fang']))
apple,banana,grape
%%js
console.log(['Darryl', 'Mico', 'Fang'].join(","));

<IPython.core.display.Javascript object>
  • Use Case: Combine a list of strings into a single string, helpful for reformatting content