FreeKB - Python Split or cut apart a string
Python - Split or cut apart a string

The split operator can be used to split a string. In this example, the foo variable is split into the bar variable at each comma.

foo= "data,more data,even more data"

bar = foo.split(',')

print(bar)

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter d6833 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |