Instantly share code, notes, and snippets.
if denom: x = total / denom else: x = 0
try: x = total / denom except ZeroDivisionError: x = 0