summaryrefslogtreecommitdiffstats
path: root/Doc/howto/doanddont.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/howto/doanddont.rst')
-rw-r--r--Doc/howto/doanddont.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst
index 5bd2eac..99d28a8 100644
--- a/Doc/howto/doanddont.rst
+++ b/Doc/howto/doanddont.rst
@@ -236,7 +236,7 @@ sequence with comparable semantics, for example, yet many people write their own
::
import sys, operator, functools
- nums = map(float, sys.argv[1:])
+ nums = list(map(float, sys.argv[1:]))
print(functools.reduce(operator.add, nums) / len(nums))
This cute little script prints the average of all numbers given on the command