Skip to content

Instantly share code, notes, and snippets.

@ajay2611
ajay2611 / python-split-function.py
Created February 14, 2018 20:50
Python's split function implementation
def split(string, delimiter):
"""
Desc: Python's split function implementation
:param string: a string
:return: a list after breaking string on delimiter match
"""
result_list = []
if not delimiter:
raise ValueError("Empty Separator")