On 6/27/2018 7:08 AM, Chris Angelico wrote:
I'm not singling out Chris here, but these discussions would be easier to follow and more illuminating if the answers to such puzzles were presented when they're posed.It gets funnier with nested loops. Or scarier. I've lost the ability to distinguish those two.def test(): spam = 1 ham = 2 vars = [key1+key2 for key1 in locals() for key2 in locals()] return vars Wanna guess what that's gonna return?
Eric _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com