diff options
Diffstat (limited to 'Doc/howto/doanddont.rst')
-rw-r--r-- | Doc/howto/doanddont.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst index a56fb8c..b4f271e 100644 --- a/Doc/howto/doanddont.rst +++ b/Doc/howto/doanddont.rst @@ -267,7 +267,8 @@ sequence with comparable semantics, for example, yet many people write their own :func:`max`/:func:`min`. Another highly useful function is :func:`reduce`. A classical use of :func:`reduce` is something like :: - import sys, operator + import operator + import sys nums = map(float, sys.argv[1:]) print reduce(operator.add, nums)/len(nums) |