On Sat, Apr 11, 2015 at 1:41 PM, Jim Mooney <[email protected]> wrote: > Why does the first range convert to a list, but not the second? > >>>> p = list(range(1,20)), (range(40,59)) >>>> p > ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], > range(40, 59)) > Assuming you are using python 3.x range is a generator, so it only produces values if you iterate over it > -- > Jim > > "Stop, Harold! That bagel has radishes!" > "Thank God, Mary - you've saved me again!" > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor
-- Joel Goldstick http://joelgoldstick.com _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
