DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
Split a string by spaces -- preserving quoted substrings -- in Python
>>> import shlex >>> shlex.split('this is "a test"') ['this', 'is', 'a test']
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Split
#string
#spaces
#preserving
#quoted
#substrings
#Python
ADD COMMENT
Topic
COMMENT
Name
9+1 =
Submit