Split by : : Split « String « Python Tutorial






entry =  "Name:James:Occupation:Software Engineer"

print entry.split(':')








5.30.Split
5.30.1.split is the inverse of join, and is used to split a string into a sequence:
5.30.2.Splitting Strings
5.30.3.split Without Arguments
5.30.4.Split by :