使用 split()函数

  1. import re
  2.  
  3. str = "China is a great country"
  4. x = re.split("\s", str)
  5. print(x)