DEV Community

Cover image for Range() Function in Python.
Keshav Jindal
Keshav Jindal

Posted on

3 2

Range() Function in Python.

1.Intoduction
The range function is used to return the sequence in number.
Syntax
range(start, stop, gap)
2.Parameters
-Start-It is a optional value. It specifies the range that where to start. Its default value is 0.

-Stop-It is a necessary step to specify the end point.

-Gap-it is a optional step to specify the incrementation. Its default increment value is 1.
Image description

For example-Image description
The output for above example is-
Image description
the starting point was not specified so, it started from default value.

NOTE
The float and String value cannot be accessed by range.
But an be accessed in sequence.
for example-Image description
output
Image description

3.Examples
1.Image description
output
Image description

  1. Image description output Image description

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more