import re foo = 'SetVariables "a" "b" "c" ' bar = re.findall('"([^"]*)"', foo) print(bar) ### ['a", 'b', 'c']