How to convert a ">" into a >

dominique MyDomDom at gmail.com
Sat Jun 21 09:25:46 EDT 2008


On Jun 21, 1:37 pm, John Machin <sjmac... at lexicon.net> wrote:
>
> Look at the operator module. In your above example:
>
> return {
>    '>': operator.gt,
>    '=': operator.eq,
>    '<': operator.lt,
>    }[variable]
>
> Cheers,
> John

Thanks a lot John
Dominique



More information about the Python-list mailing list