Mega Code Archive

 
Categories / Python / String
 

String splits by another string

line = "i'mSPAMaSPAMlumberjack" print line.split("SPAM")