[EMAIL PROTECTED] 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: pgpEdJ9SLHXXB.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to