Re: removing characters before writing to file
- From: Stefan Neumann <stefan.neumann@xxxxxxxxxxxx>
- Date: Thu, 09 Feb 2006 16:09:22 +0100
eight02645999@xxxxxxxxx wrote:
hi
i have some output that returns a lines of tuples eg
('sometext1', 1421248118, 1, 'P ')
('sometext2', 1421248338, 2, 'S ')
and so on
....
If the braces are always at the begining and at the end of the string,
you could also use:
>>> "('sometext1', 1421248118, 1, 'P ')"[1:-1]
"'sometext1', 1421248118, 1, 'P '"
cheers
Stefan
Attachment:
pgp8ltr14EODb.pgp
Description: PGP signature
- References:
- removing characters before writing to file
- From: eight02645999
- removing characters before writing to file
- Prev by Date: Re: thread dump
- Next by Date: super(...).__init__() vs Base.__init__(self)
- Previous by thread: Re: removing characters before writing to file
- Next by thread: random playing soundfiles according to rating.
- Index(es):
Relevant Pages
|