Problem Wk.5.1.2: Ranger

advertisement
Problem Wk.5.1.2: Ranger
Write an expression that is a single call to range, such as range(2, 3) to generate each
of the following lists.
1. [0, 1, 2, 3, 4]
2. [44, 45, 46]
3. [-3, -2, -1, 0, 1]
4. [1, 3, 5, 7]
5. [5, 4, 3, 2]
MIT OpenCourseWare
http://ocw.mit.edu
6.01SC Introduction to Electrical Engineering and Computer Science
Spring 2011
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Download