diff --git a/README.md b/README.md index 41eeb19..f041d61 100644 --- a/README.md +++ b/README.md @@ -1097,9 +1097,12 @@ from operator import add, sub, mul, truediv, floordiv, mod, pow, neg, abs, \ ``` ```python -product_of_elems = functools.reduce(mul, ) -sorted_by_second = sorted(, key=itemgetter(1)) -sorted_by_both = sorted(, key=itemgetter(0, 1)) +import operator as op +product_of_elems = functools.reduce(op.mul, ) +sorted_by_second = sorted(, key=op.itemgetter(1)) +sorted_by_both = sorted(, key=op.itemgetter(0, 1)) +LogicOp = Enum('LogicOp', {'AND': (op.and_, ), + 'OR' : (op.or_, )}) ```