Re: Program xy.py
Mats Wichmann <[email protected]>
| Newsgroups | gmane.comp.python.tutor |
|---|---|
| Message-ID | <[email protected]> |
On 12/22/23 04:49, Ethan Rosenberg wrote: > Thank you for the excellent help you give to python programmers. > > This program should put i*j in a 2x2 matrix. > for j in range(0,1): From the Python interpreter itself: >>> help(range) Help on class range in module builtins: class range(object) | range(stop) -> range object | range(start, stop[, step]) -> range object | | Return an object that produces a sequence of integers from start (inclusive) | to stop (exclusive) by step. Notice it doesn't include the stop value, so if you think you're getting an iterator that produces two values from range(0, 1) - you won't. You'd need range(0, 2) for that. _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor