Re: s.split() on multiple separators
- From: "Francesco Guerrieri" <f.guerrieri@xxxxxxxxx>
- Date: Sun, 30 Sep 2007 17:48:56 +0200
On 9/30/07, mrkafk@xxxxxxxxx <mrkafk@xxxxxxxxx> wrote:
Hello everyone,
OK, so I want to split a string c into words using several different
separators from a list (dels).
Have a look at this recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303342
which contains several ways to solve the problem. You could both
translate all your separators to a single one, and then split over it,
or (maybe the simpler solution) going for the list comprehension
solution.
francesco
.
- References:
- s.split() on multiple separators
- From: mrkafk
- s.split() on multiple separators
- Prev by Date: Re: s.split() on multiple separators
- Next by Date: Re: Create a string array of all comments in a html file...
- Previous by thread: Re: s.split() on multiple separators
- Next by thread: Re: s.split() on multiple separators
- Index(es):
Relevant Pages
|