是的,可以使用shlex.split()函数:>>> import shlex >>> shlex.split('Some whitespace "separated string"') ['Some', 'whitespace', 'separated string']