split()函数返回一个列表,其中字符串在每次匹配时都被拆分:在每个空格字符处拆分:import retxt = "The glass in table"x = re.split("\s", txt)print(x)执行结果:['The', 'glass', 'in', 'table']