Run
str = 'apple,,orange,,,grape' #split string by , chunks = str.split(',') print(chunks)
Output