@sashkello: That won't help for this problem, because str.split won't distinguish between spaces within the quotes and spaces between the quoted strings.
@abarnert I agree that the csv module is a better solution, but stripping off the quotes is not a problem. In fact, [s for s in '"Doe, Mary" "W 135"'.split('"') if s.strip()] ought to work unless one of the lines is like "foo" " "\n
@sashkello: No, it can't be done easily. str.split can't split on variable-length patterns (except for the special case of "any range of whitespace"). And there's now way it can distinguish quotes unless they're part of the split pattern. So, the only way you could possibly do it with str.split is to first split on words, then group by quotes, then re-join each group, which is far from easy. (@sashkello: Of course re.split is another story—it can split on variable-length patterns, which solves the problem with str.split immediately.)
Also, the fact that two pretty clever people went through a number of different attempts that they were confident would work, but they didn't, kind of proves that it's not easy…
str.splitwon't distinguish between spaces within the quotes and spaces between the quoted strings.csvmodule is a better solution, but stripping off the quotes is not a problem. In fact,[s for s in '"Doe, Mary" "W 135"'.split('"') if s.strip()]ought to work unless one of the lines is like"foo" " "\nstr.splitcan't split on variable-length patterns (except for the special case of "any range of whitespace"). And there's now way it can distinguish quotes unless they're part of the split pattern. So, the only way you could possibly do it withstr.splitis to first split on words, then group by quotes, then re-join each group, which is far from easy. (@sashkello: Of coursere.splitis another story—it can split on variable-length patterns, which solves the problem withstr.splitimmediately.)"Doe Two-Space Mary" "W 135"and see what you get. Are you deliberately trying to prove my point here?