Serhiy,

On 22/11/18 10:50, Serhiy Storchaka wrote:
21.11.18 22:17, Cameron Simpson пише:
Can someone show me a real world, or failing that - sane looking, chained comparison using "in"?

     s[0] == s[-1] in '\'"'

Tests that string s starts and ends with a single or double quote.


Am admiring this solution. Don't most people resort immediately to regular expressions?

Did you just 'come up with' this idea, or have you performed any testing to say that this is the most efficient/not too much more expensive...?

--
Please advise =dn
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to