About 10,700,000 results
Open links in new tab
  1. Why does range(start, end) not include end? - Stack Overflow

    Basically in python range(n) iterates n times, which is of exclusive nature that is why it does not give last value when it is being printed, we can create a function which gives inclusive value it …

  2. python - How do I create a list with numbers between two values ...

    Aug 16, 2013 · How do I create a list of numbers between two values? For example, a list between 11 and 16: [11, 12, 13, 14, 15, 16]

  3. Print a list in reverse order with range ()? - Stack Overflow

    Sep 2, 2011 · Using "reversed" with python generator (assuming we ware talking of Python 3 range built-in) is just conceptually wrong and teaches wrong habits of not considering …

  4. iteration - How to loop backwards in python? - Stack Overflow

    I used range simply because the OP did. xrange vs range only matters for really large ranges, like hundreds of megabytes. Also, in Python 3.x, this distinction is gone.

  5. What is the difference between range and xrange functions in …

    range() in Python 2.x This function is essentially the old range() function that was available in Python 2.x and returns an instance of a list object that contains the elements in the specified …

  6. slice - How slicing in Python works - Stack Overflow

    Python slicing is a computationally fast way to methodically access parts of your data. In my opinion, to be even an intermediate Python programmer, it's one aspect of the language that it …

  7. python - Concatenating two range function results - Stack Overflow

    Dec 31, 2012 · This is what range(5) + range(10, 20) exactly did in Python 2.5 -- because range() returned a list. In Python 3, it is only useful if you really want to construct the list.

  8. Python 3 turn range to a list - Stack Overflow

    Jul 14, 2012 · 275 I'm trying to make a list with numbers 1-1000 in it. Obviously this would be annoying to write/read, so I'm attempting to make a list with a range in it. In Python 2 it seems …

  9. datetime - Creating a range of dates in Python - Stack Overflow

    Feb 2, 2012 · Creating a range of dates in Python Asked 16 years, 4 months ago Modified 1 year ago Viewed 1.0m times

  10. python - How can I access the index value in a 'for' loop? - Stack …

    It does: for i in range(5) or for i in range(len(ints)) will do the universally common operation of iterating over an index. But if you want both the item and the index, enumerate is a very useful …