[Tutor] For - if - else loop; print selective output

Alan Gauld alan.gauld at btinternet.com
Wed Oct 24 21:24:59 CEST 2012


On 24/10/12 18:49, eryksun wrote:

> Using "in ['25', '26']" also checks a compiled tuple constant:
>
>      >>> compile("x in ['25', '26']", '', 'eval').co_consts
>      ('25', '26', ('25', '26'))
>
> 3.x adds frozenset support:
>
>      >>> compile("x in {'25', '26'}", '', 'eval').co_consts
>      ('25', '26', frozenset({'25', '26'}))

I confess I don't know what that means!
And if I don't I doubt if the OP will either.
Can you explain the above in English please?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list