Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27034 > unrolled thread
| Started by | Andreas Tawn <andreas.tawn@ubisoft.com> |
|---|---|
| First post | 2012-08-14 11:44 +0200 |
| Last post | 2012-08-14 11:44 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: something about split()??? Andreas Tawn <andreas.tawn@ubisoft.com> - 2012-08-14 11:44 +0200
| From | Andreas Tawn <andreas.tawn@ubisoft.com> |
|---|---|
| Date | 2012-08-14 11:44 +0200 |
| Subject | RE: something about split()??? |
| Message-ID | <mailman.3262.1344938735.4697.python-list@python.org> |
> I have a question about the split function? surpose a = "|",and when I use a.split("|") , I got the list
> ['"",""] ,but I want to get the empty list,what should I do ?
Something like...
>>> [x for x in "|".split("|") if x]
[]
Cheers,
Drea
Back to top | Article view | comp.lang.python
csiph-web