Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75857 > unrolled thread
| Started by | elearn <elearn2014@gmail.com> |
|---|---|
| First post | 2014-08-08 08:23 +0800 |
| Last post | 2014-08-08 08:23 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
more simple to split the string? elearn <elearn2014@gmail.com> - 2014-08-08 08:23 +0800
| From | elearn <elearn2014@gmail.com> |
|---|---|
| Date | 2014-08-08 08:23 +0800 |
| Subject | more simple to split the string? |
| Message-ID | <mailman.12730.1407457404.18130.python-list@python.org> |
str='(\\HasNoChildren \\Junk) "/" "[Gmail]/&V4NXPpCuTvY-"'
x=str.split(' "')
[i.replace('"','') for i in x]
['(\\HasNoChildren \\Junk)', '/', '[Gmail]/&V4NXPpCuTvY-']
x.strip(" ") will create four parts.
is there more simple to do that ?
Back to top | Article view | comp.lang.python
csiph-web