Splitting Strings
- Splits a string into a list of substrings based on a delimiter (most commonly a space or comma)
- .split() in Python and JS
print("Darryl,Mico,Fang".split(","))
['Darryl', 'Mico', 'Fang']
%%js
console.log("Darryl,Mico,Fang".split(","));
<IPython.core.display.Javascript object>
- Use Case: Parse through CSV files or processing large lists of items