On 12/30/2016 05:26 PM, Deborah Swanson wrote: > I'm still wondering if these 4 lines can be collapsed to one or two > lines.
If the logic is clearly expressed in the if blocks that you have, I don't see why collapsing an if block into one or two lines would even be desirable. Making a clever one-liner out of something isn't always a good thing. In fact some programmers don't like to use the ternary operator or conditional expressions, preferring to use explicit if block logic. -- https://mail.python.org/mailman/listinfo/python-list
