René's URL Explorer Experiment


Title: Python range(): Represent Numerical Ranges – Real Python

Open Graph Title: Python range(): Represent Numerical Ranges – Real Python

Description: Master the Python range() function and learn how it works under the hood. You most commonly use ranges in loops. In this tutorial, you'll learn how to iterate over ranges but also identify when there are better alternatives.

Open Graph Description: Master the Python range() function and learn how it works under the hood. You most commonly use ranges in loops. In this tutorial, you'll learn how to iterate over ranges but also identify when there are better alternatives.

Mail addresses
?subject=Python article for you&body=Python range(): Represent Numerical Ranges on Real Python https://realpython.com/python-range/

Opengraph URL: https://realpython.com/python-range/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Python range(): Represent Numerical Ranges",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/Pythons-range-function_Watermark.5e8ea929167e.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-range/",
    "lastReviewed": "2024-11-24",
    "author": {
      "@type": "Person",
      "name": "Geir Arne Hjelle",
      "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
      "url": "https://realpython.com/team/gahjelle/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Adriana Cutenco",
        "image": "https://realpython.com/cdn-cgi/image/width=900,height=900,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/acutenco.676e4197c133.jpg",
        "url": "https://realpython.com/team/acutenco/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brenda Weleschuk",
        "image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
        "url": "https://realpython.com/team/bweleschuk/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Bartosz Zaczy\u0144ski",
        "image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
        "url": "https://realpython.com/team/bzaczynski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "David Amos",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/me-small.f5f49f1c48e1.jpg",
        "url": "https://realpython.com/team/damos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Jon Fincher",
        "image": "https://realpython.com/cdn-cgi/image/width=336,height=336,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Running_headshot.b3e2d17c6828.jpg",
        "url": "https://realpython.com/team/jfincher/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Kate Finegan",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/VZxEtUor_400x400.7169c68e3950.jpg",
        "url": "https://realpython.com/team/kfinegan/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Krystal Flores",
        "image": "https://realpython.com/cdn-cgi/image/width=1500,height=1500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/real-python-logo-square.28474fda9228.png",
        "url": "https://realpython.com/team/kflores/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Leodanis Pozo Ramos",
        "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
        "url": "https://realpython.com/team/lpozoramos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2024-11-24T14:00:00+00:00",
  "dateModified": "2024-11-24T14:09:21.779491+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Geir Arne Hjelle",
    "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
    "url": "https://realpython.com/team/gahjelle/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "Master the Python range() function and learn how it works under the hood. You most commonly use ranges in loops. In this tutorial, you'll learn how to iterate over ranges but also identify when there are better alternatives.",
  "hasPart": {
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "What\u2019s the range() function in Python used for?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "

The range() function in Python is used to generate a sequence of numbers. It’s commonly used in loops to iterate over a sequence of numbers. It can be called with one, two, or three integer arguments to specify the start, stop, and step of the sequence. By default, it starts at 0 and increments by 1 until it reaches the stop value.

" } }, { "@type": "Question", "name": "How do you reverse a range in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

To create a range that counts backwards, you can use a negative step value. For example, range(5, 0, -1) creates a range that counts down from 5 to 1, inclusive. To reverse a general range, use reversed().

" } }, { "@type": "Question", "name": "Can you use range() with negative numbers in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

Yes, you can use negative numbers with range(). You can create ranges that include negative numbers, such as range(-10, 0), which generates numbers from -10 to -1.

" } }, { "@type": "Question", "name": "What are some alternatives to using range() in loops?", "acceptedAnswer": { "@type": "Answer", "text": "

Alternatives to using range() in loops include iterating directly over elements of a sequence, using enumerate() to access both elements and their indices, and using zip() to iterate over multiple sequences in parallel.

" } }, { "@type": "Question", "name": "How can you create a range with non-integer-like numbers in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

While range() itself only accepts integers, you can create custom classes that mimic integer behavior by implementing the .__index__() method. This allows you to create custom integer-like objects that can be used with range().

" } } ] } }

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Pythons-range-function_Watermark.5e8ea929167e.jpg
og:imagehttps://files.realpython.com/media/Pythons-range-function_Watermark.5e8ea929167e.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-range/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/python-range/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fpython-range%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-range/#toc
Construct Numerical Rangeshttps://realpython.com/python-range/#construct-numerical-ranges
Count From Zerohttps://realpython.com/python-range/#count-from-zero
Count From Start to Stophttps://realpython.com/python-range/#count-from-start-to-stop
Count From Start to Stop While Stepping Over Numbershttps://realpython.com/python-range/#count-from-start-to-stop-while-stepping-over-numbers
Use Python’s range() Function to Create Specific Rangeshttps://realpython.com/python-range/#use-pythons-range-function-to-create-specific-ranges
Handle Ranges Over Negative Numbershttps://realpython.com/python-range/#handle-ranges-over-negative-numbers
Work With an Empty Rangehttps://realpython.com/python-range/#work-with-an-empty-range
Count Backward With Negative Stepshttps://realpython.com/python-range/#count-backward-with-negative-steps
Loop Through Ranges or Use an Alternativehttps://realpython.com/python-range/#loop-through-ranges-or-use-an-alternative
Repeat an Operationhttps://realpython.com/python-range/#repeat-an-operation
Loop Directly Over the Iterator Insteadhttps://realpython.com/python-range/#loop-directly-over-the-iterator-instead
Use enumerate() to Create Indices Insteadhttps://realpython.com/python-range/#use-enumerate-to-create-indices-instead
Use zip() for Parallel Iteration Insteadhttps://realpython.com/python-range/#use-zip-for-parallel-iteration-instead
Explore Other Features and Uses of Rangeshttps://realpython.com/python-range/#explore-other-features-and-uses-of-ranges
Access Individual Numbers of a Rangehttps://realpython.com/python-range/#access-individual-numbers-of-a-range
Create Subranges With Sliceshttps://realpython.com/python-range/#create-subranges-with-slices
Check Whether a Number Is a Member of a Rangehttps://realpython.com/python-range/#check-whether-a-number-is-a-member-of-a-range
Calculate the Number of Elements in a Rangehttps://realpython.com/python-range/#calculate-the-number-of-elements-in-a-range
Reverse a Rangehttps://realpython.com/python-range/#reverse-a-range
Create a Range Using Integer-Like Parametershttps://realpython.com/python-range/#create-a-range-using-integer-like-parameters
Conclusionhttps://realpython.com/python-range/#conclusion
Frequently Asked Questionshttps://realpython.com/python-range/#frequently-asked-questions
https://realpython.com/feedback/survey/article/python-range/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-range/disliked/?from=article-sidebar
The Python range() Functionhttps://realpython.com/courses/python-range-function/
Geir Arne Hjellehttps://realpython.com/python-range/#author
https://realpython.com/python-range/#reader-comments
basicshttps://realpython.com/tutorials/basics/
pythonhttps://realpython.com/tutorials/python/
Construct Numerical Rangeshttps://realpython.com/python-range/#construct-numerical-ranges
Count From Zerohttps://realpython.com/python-range/#count-from-zero
Count From Start to Stophttps://realpython.com/python-range/#count-from-start-to-stop
Count From Start to Stop While Stepping Over Numbershttps://realpython.com/python-range/#count-from-start-to-stop-while-stepping-over-numbers
Use Python’s range() Function to Create Specific Rangeshttps://realpython.com/python-range/#use-pythons-range-function-to-create-specific-ranges
Handle Ranges Over Negative Numbershttps://realpython.com/python-range/#handle-ranges-over-negative-numbers
Work With an Empty Rangehttps://realpython.com/python-range/#work-with-an-empty-range
Count Backward With Negative Stepshttps://realpython.com/python-range/#count-backward-with-negative-steps
Loop Through Ranges or Use an Alternativehttps://realpython.com/python-range/#loop-through-ranges-or-use-an-alternative
Repeat an Operationhttps://realpython.com/python-range/#repeat-an-operation
Loop Directly Over the Iterator Insteadhttps://realpython.com/python-range/#loop-directly-over-the-iterator-instead
Use enumerate() to Create Indices Insteadhttps://realpython.com/python-range/#use-enumerate-to-create-indices-instead
Use zip() for Parallel Iteration Insteadhttps://realpython.com/python-range/#use-zip-for-parallel-iteration-instead
Explore Other Features and Uses of Rangeshttps://realpython.com/python-range/#explore-other-features-and-uses-of-ranges
Access Individual Numbers of a Rangehttps://realpython.com/python-range/#access-individual-numbers-of-a-range
Create Subranges With Sliceshttps://realpython.com/python-range/#create-subranges-with-slices
Check Whether a Number Is a Member of a Rangehttps://realpython.com/python-range/#check-whether-a-number-is-a-member-of-a-range
Calculate the Number of Elements in a Rangehttps://realpython.com/python-range/#calculate-the-number-of-elements-in-a-range
Reverse a Rangehttps://realpython.com/python-range/#reverse-a-range
Create a Range Using Integer-Like Parametershttps://realpython.com/python-range/#create-a-range-using-integer-like-parameters
Conclusionhttps://realpython.com/python-range/#conclusion
Frequently Asked Questionshttps://realpython.com/python-range/#frequently-asked-questions
Remove adshttps://realpython.com/account/join/
The Python range() Functionhttps://realpython.com/courses/python-range-function/
list()https://realpython.com/python-list/#using-the-list-constructor
Click here to download the free sample codehttps://realpython.com/bonus/python-range-code/
https://realpython.com/python-range/#construct-numerical-ranges
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#count-from-zero
listhttps://realpython.com/python-list/
https://realpython.com/python-range/#count-from-start-to-stop
https://realpython.com/python-range/#count-from-start-to-stop-while-stepping-over-numbers
https://realpython.com/python-range/#use-pythons-range-function-to-create-specific-ranges
functionhttps://realpython.com/defining-your-own-python-function/
constructorhttps://realpython.com/python-class-constructor/
classhttps://realpython.com/python-classes/
lazyhttps://en.wikipedia.org/wiki/Lazy_evaluation
half-open intervalshttps://en.wikipedia.org/wiki/Interval_(mathematics)
several advantageshttps://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF
Edsger W. Dijkstrahttps://www.cs.utexas.edu/users/EWD/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#handle-ranges-over-negative-numbers
https://realpython.com/python-range/#work-with-an-empty-range
https://realpython.com/python-range/#count-backward-with-negative-steps
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#loop-through-ranges-or-use-an-alternative
while loophttps://realpython.com/python-while-loop/
for loophttps://realpython.com/python-for-loop/
C++https://realpython.com/python-vs-cpp/
Javahttps://realpython.com/java-vs-python/
JavaScripthttps://realpython.com/python-vs-javascript/
https://realpython.com/python-range/#repeat-an-operation
three timeshttps://screenrant.com/big-bang-theory-sheldon-penny-door-knocking-reason/
throwaway variablehttps://realpython.com/python-double-underscore/#other-usages-of-underscores-in-python
f-stringhttps://realpython.com/python-f-strings/
https://realpython.com/python-range/#loop-directly-over-the-iterator-instead
iterablehttps://realpython.com/python-iterators-iterables/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#use-enumerate-to-create-indices-instead
enumerate()https://realpython.com/python-enumerate/
https://realpython.com/python-range/#use-zip-for-parallel-iteration-instead
zip()https://realpython.com/python-zip-function/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#explore-other-features-and-uses-of-ranges
tupleshttps://realpython.com/python-tuple/
listshttps://realpython.com/python-list/
https://realpython.com/python-range/#access-individual-numbers-of-a-range
https://realpython.com/python-range/#create-subranges-with-slices
sliceshttps://realpython.com/python-list/#retrieving-multiple-items-from-a-list-slicing
https://realpython.com/python-range/#check-whether-a-number-is-a-member-of-a-range
fasthttps://realpython.com/python-range-membership-test/
is a memberhttps://realpython.com/python-in-operator/
leap yearhttps://en.wikipedia.org/wiki/Leap_year
modulus operatorhttps://realpython.com/python-modulo-operator/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#calculate-the-number-of-elements-in-a-range
len()https://realpython.com/len-python-function/
https://realpython.com/python-range/#reverse-a-range
reversed()https://realpython.com/python-reverse-list/#the-built-in-reversed-function
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#create-a-range-using-integer-like-parameters
special methodhttps://realpython.com/python-magic-methods/
π-digitshttps://www.piday.org/million/
custom FloatRange classhttps://realpython.com/python-reverse-list/#the-special-method-__reversed__
NumPyhttps://realpython.com/numpy-tutorial/
arange()https://realpython.com/how-to-use-numpy-arange/
https://realpython.com/python-range/#conclusion
Click here to download the free sample codehttps://realpython.com/bonus/python-range-code/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-range/#frequently-asked-questions
https://realpython.com/feedback/survey/article/python-range/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-range/disliked/?from=article-footer
The Python range() Functionhttps://realpython.com/courses/python-range-function/
https://realpython.com/team/gahjelle/
» More about Geir Arnehttps://realpython.com/team/gahjelle/
https://realpython.com/team/acutenco/
Adrianahttps://realpython.com/team/acutenco/
https://realpython.com/team/bweleschuk/
Brendahttps://realpython.com/team/bweleschuk/
https://realpython.com/team/bzaczynski/
Bartoszhttps://realpython.com/team/bzaczynski/
https://realpython.com/team/damos/
Davidhttps://realpython.com/team/damos/
https://realpython.com/team/jfincher/
Jonhttps://realpython.com/team/jfincher/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
https://realpython.com/team/kfinegan/
Katehttps://realpython.com/team/kfinegan/
https://realpython.com/team/kflores/
Krystalhttps://realpython.com/team/kflores/
https://realpython.com/team/lpozoramos/
Leodanishttps://realpython.com/team/lpozoramos/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-range
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-range
https://realpython.com/feedback/survey/article/python-range/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-range/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-range%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Python%20range%28%29%3A%20Represent%20Numerical%20Ranges&url=https%3A%2F%2Frealpython.com%2Fpython-range%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Python%20range%28%29%3A%20Represent%20Numerical%20Ranges%20https%3A%2F%2Frealpython.com%2Fpython-range%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-range%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
basicshttps://realpython.com/tutorials/basics/
pythonhttps://realpython.com/tutorials/python/
The Python range() Functionhttps://realpython.com/courses/python-range-function/
Python for Loops: The Pythonic Wayhttps://realpython.com/python-for-loop/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-range
Python enumerate(): Simplify Loops That Need Countershttps://realpython.com/python-enumerate/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-range
Python while Loops: Repeating Tasks Conditionallyhttps://realpython.com/python-while-loop/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-range
Strings and Character Data in Pythonhttps://realpython.com/python-strings/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-range
Python Modulo in Practice: How to Use the % Operatorhttps://realpython.com/python-modulo-operator/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-range
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-range%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-range%2F
Sign-Inhttps://realpython.com/account/login/?next=/python-range/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.