split
Fredrik Lundh
fredrik at pythonware.com
Tue May 8 12:33:36 EDT 2001
More information about the Python-list mailing list
Tue May 8 12:33:36 EDT 2001
- Previous message (by thread): split
- Next message (by thread): split
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin Johansson wrote:
> I have a string s that contains "( 7 Maj 21:58)"
> and i want to save 7 Maj in a variable named date.
> But I dont understand what I suppose to write in the split method.
> date = string.split(s, "( ", ")")
what's wrong with
date = string.strip(s[1:-1])
Cheers /F
- Previous message (by thread): split
- Next message (by thread): split
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list