Split a string by ',' : String Split « String « Python






Split a string by ','

Split a string by ','

line = 'bob,hacker,40'
print line.split(',')

           
       








Related examples in the same category

1.Splitting stringsSplitting strings
2.A sentence is split up into a list of wordsA sentence is split up into a list of words
3.String splits by another string String splits by another string