Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5360

Re: How best to convert a string "list" to a python list

References <2efc3a05-22e5-46db-bd22-c95221bbd7b2@k16g2000yqm.googlegroups.com> <pan.2011.05.14.08.40.47.47000@nowhere.com>
Date 2011-05-14 21:16 +1100
Subject Re: How best to convert a string "list" to a python list
From Daniel Kluev <dan.kluev@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1545.1305368166.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, May 14, 2011 at 7:41 PM, Nobody <nobody@nowhere.com> wrote:
> to use a regular expression to match everything up to the next delimiter,
> and do this in a loop to extract the individual items.

re.findall() should let you match all items at once, without loop.

-- 
With best regards,
Daniel Kluev

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How best to convert a string "list" to a python list noydb <jenn.duerr@gmail.com> - 2011-05-13 10:15 -0700
  Re: How best to convert a string "list" to a python list Jerry Hill <malaclypse2@gmail.com> - 2011-05-13 13:30 -0400
  Re: How best to convert a string "list" to a python list MRAB <python@mrabarnett.plus.com> - 2011-05-13 18:36 +0100
  Re: How best to convert a string "list" to a python list Redcat <redcat@catfolks.net> - 2011-05-13 19:26 +0000
  Re: How best to convert a string "list" to a python list Nobody <nobody@nowhere.com> - 2011-05-14 09:41 +0100
    Re: How best to convert a string "list" to a python list Daniel Kluev <dan.kluev@gmail.com> - 2011-05-14 21:16 +1100
    Re: How best to convert a string "list" to a python list Terry Reedy <tjreedy@udel.edu> - 2011-05-14 15:59 -0400

csiph-web