Login and get codingAnother text manipulation Bite. Code
split_words_and_quoted_text
that takes a text string and splits it by space, except words that are wrapped between double quotes ("), these spaces needs to be preserved.So passing it Should give "3 words only", it would return a list of 3 (not 5) elements: ['Should', 'give', '3 words only'] (note that the double quotes are stripped off as well).
Check out the standard library, there might be a tool for the job ;) - good luck and keep calm and code in Python!
Will you be Pythonista #187 to crack this Bite?
Resolution time: ~42 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 4.22 on a 1-10 difficulty scale.
» Up for a challenge? 💪