on demandso we need to wrap it in list call to display its results all at once in onlylist(range( ))list(range( ))list(range( )([ ][ ][ ]with one argumentrange generates list of integers from zero up to but not including the argument' value if you pass in two argumentsthe first is taken as the lower bound an optional third argument can give stepif it is usedpython adds the step to each successive integer in the result (the step defaults to + ranges can also be nonpositive and nonascendingif you want them to belist(range(- )[- - - - - list(range( - - )[ - - - - we'll get more formal about iterables like this one in therewe'll also see that python has cousin named xrangewhich is like its range but doesn' build the result list in memory all at once this is space optimizationwhich is subsumed in by the generator behavior of its range although such range results may be useful all by themselvesthey tend to come in most handy within for loops for one thingthey provide simple way to repeat an action specific number of times to print three linesfor exampleuse range to generate the appropriate number of integersfor in range( )print( 'pythons' pythons pythons pythons note that for loops force results from range automatically in xso we don' need to use list wrapper here in (in we get temporary list unless we call xrange insteadsequence scanswhile and range versus for the range call is also sometimes used to iterate over sequence indirectlythough it' often not the best approach in this role the easiest and generally fastest way to step through sequence exhaustively is always with simple foras python handles most of the details for youx 'spamfor item in xprint(itemend=' simple iteration loop coding techniques