AnalogClock






Wednesday, October 1, 2014

Python - exception avoidance

m1 = []
m2 = None
m1_total = m1 and max(m1) or None
m2_total = m2 and min(m2) or 0


2 comments:

Unknown said...

Nice! Finally some terse python code!

Unknown said...

Nice! Finally some terse python code!