On 5/14/2011 4:41 AM, Nobody wrote:
On Fri, 13 May 2011 10:15:29 -0700, noydb wrote:
I want some code to take the items in a semi-colon-delimted string "list"
and places each in a python list. I came up with below. In the name of
learning how to do things properly, do you experts have a bette
On Sat, May 14, 2011 at 7:41 PM, Nobody 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
--
http://ma
On Fri, 13 May 2011 10:15:29 -0700, noydb wrote:
> I want some code to take the items in a semi-colon-delimted string "list"
> and places each in a python list. I came up with below. In the name of
> learning how to do things properly, do you experts have a better way of
> doing it?
> x = "red;
On 5/13/2011 3:38 PM, noydb wrote:
> I want some code to take the items in a semi-colon-delimted string
> "list" and places each in a python list. I came up with below. In
> the name of learning how to do things properly,
No big deal that you weren't aware of the split() method for strings.
Sin
On Fri, May 13, 2011 at 11:15 AM, noydb wrote:
> I want some code to take the items in a semi-colon-delimted string
> "list" and places each in a python list. I came up with below. In
> the name of learning how to do things properly, do you experts have a
> better way of doing it?
>
> Thanks fo
On Fri, 13 May 2011 10:15:29 -0700, noydb wrote:
> I want some code to take the items in a semi-colon-delimted string
> "list" and places each in a python list. I came up with below. In the
> name of learning how to do things properly, do you experts have a better
> way of doing it?
How about t
On 13/05/2011 18:15, noydb wrote:
I want some code to take the items in a semi-colon-delimted string
"list" and places each in a python list. I came up with below. In
the name of learning how to do things properly, do you experts have a
better way of doing it?
Thanks for any inputs!
***
x = "
On May 13, 1:25 pm, Mark Niemczyk wrote:
> There are a series of built-in methods for string objects; including the
> split method which will accomplish exactly the result you are looking for.
>
> >>> x = "red;blue;green;yellow"
> >>> color_list = x.split(';')
> >>> color_list
>
> ['red', 'blue',
On Fri, May 13, 2011 at 1:15 PM, noydb wrote:
> I want some code to take the items in a semi-colon-delimted string
> "list" and places each in a python list. I came up with below. In
> the name of learning how to do things properly, do you experts have a
> better way of doing it?
Strings have a
There are a series of built-in methods for string objects; including the split
method which will accomplish exactly the result you are looking for.
>>> x = "red;blue;green;yellow"
>>> color_list = x.split(';')
>>> color_list
['red', 'blue', 'green', 'yellow']
>>>
Here is the link to a discussio
I want some code to take the items in a semi-colon-delimted string
"list" and places each in a python list. I came up with below. In
the name of learning how to do things properly, do you experts have a
better way of doing it?
Thanks for any inputs!
***
x = "red;blue;green;yellow" ## string of
11 matches
Mail list logo