How To Write Split Function In Python