Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38975
| References | <511ebf0c$0$21334$9a6e19ea@unlimited.newshosting.com> |
|---|---|
| Date | 2013-02-15 18:19 -0500 |
| Subject | Re: Howto parse a string using a char in python |
| From | David Robinow <drobinow@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1858.1360970352.2939.python-list@python.org> (permalink) |
On Fri, Feb 15, 2013 at 6:04 PM, Steve Goodwin <sgoodwin@cfl.rr.com> wrote:
> Hi,
>
> I am looking for the python2.7 function(s) to parse a string from a colon
> character ":"
>
> Sounds simple enough.
>
> For example, a string like "123456:789". I just need the "123456"
> substring.(left of the :)
"123456:789".split(":")[0]
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Howto parse a string using a char in python "Steve Goodwin" <sgoodwin@cfl.rr.com> - 2013-02-15 18:04 -0500 Re: Howto parse a string using a char in python John Gordon <gordon@panix.com> - 2013-02-15 23:11 +0000 Re: Howto parse a string using a char in python Tim Chase <python.list@tim.thechases.com> - 2013-02-15 17:16 -0600 Re: Howto parse a string using a char in python David Robinow <drobinow@gmail.com> - 2013-02-15 18:19 -0500 Re: Howto parse a string using a char in python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-15 23:20 +0000 Re: Howto parse a string using a char in python Gary Chambers <gwchamb@gwcmail.com> - 2013-02-15 18:13 -0500
csiph-web