Answers for "Split a string by spaces -- preserving quoted substrings -- in Python"

0

Split a string by spaces -- preserving quoted substrings -- in Python

>>> import shlex
>>> shlex.split('this is "a test"')
['this', 'is', 'a test']
Posted by: Guest on April-22-2022

Code answers related to "Split a string by spaces -- preserving quoted substrings -- in Python"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language