how to separate the strings in a string
Egon Frerich
egon at frerich.eu
Fri Apr 2 05:16:50 EDT 2021
I have a string like
'"ab,c" , def'
and need to separate it into
"ab,c" and "def".
split separates at the first ',':
>>> bl
'"a,bc", def'
>>> bl.split(',')
['"a', 'bc"', ' def']
Egon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://mail.python.org/pipermail/python-list/attachments/20210402/e4f520c1/attachment.sig>
More information about the Python-list
mailing list