fork download
  1. import re
  2.  
  3. text = "Name: abc and Age:24"
  4.  
  5. print(re.split(r" and ",text))
Success #stdin #stdout 0.01s 7736KB
stdin
Standard input is empty
stdout
['Name: abc', 'Age:24']