Categories
5G Network
Agile
Amazon EC2
Android
Angular
Ansible
Arduino
Artificial Intelligence
Augmented Reality
AWS
Azure
Big Data
Blockchain
BootStrap
Cache Teachniques
Cassandra
Commercial Insurance
C#
C++
Cloud
CD
CI
Cyber Security
Data Handling
Data using R
Data Science
DBMS
Design-Pattern
DevOps
ECMAScript
Fortify
Ethical Hacking
Framework
GIT
GIT Slack
Gradle
Hadoop
HBase
HDFS
Hibernate
Hive
HTML
Image Processing
IOT
JavaScript
Java
Jenkins
Jira
JUnit
Kibana
Linux
Machine Learning
MangoDB
MVC
NGINX
Onsen UI
Oracle
PHP
Python
QTP
R Language
Regression Analysis
React JS
Robotic
Salesforce
SAP
Selenium
Service Discovery
Service Now
SOAP UI
Spark SQL
Testing
TOGAF
Research Method
Virtual Reality
Vue.js
Home
Recent Q&A
Feedback
Ask a Question
What Is A Built-In Function That Python Uses To Iterate Over A Number Sequence?
Home
>
Python
>
What Is A Built-In Function That Python Uses To Iterate Over A Number Sequence?
Dec 14, 2019
in
Python
Q: What Is A Built-In Function That Python Uses To Iterate Over A Number Sequence?
#python-functions
1
Answer
0
votes
Dec 14, 2019
Range() generates a list of numbers, which is used to iterate over for loops.
for i in range(5):
print(i)
The range() function accompanies two sets of parameters.
range(stop)
stop: It is the no. of integers to generate and starts from zero. eg. range(3) == [0, 1, 2].
range([start], stop[, step])
Start: It is the starting no. of the sequence.
Stop: It specifies the upper limit of the sequence.
Step: It is the incrementing factor for generating the sequence.
Points to note:
Only integer arguments are allowed.
Parameters can be positive or negative.
The range() function in Python starts from the zeroth index.
Click here to read more about Python
Click here to read more about Insurance
Facebook
Twitter
LinkedIn
Related questions
0
votes
Q: Can you please clarify what is an underlying capacity that Python Language uses to repeat over a number grouping?
Aug 29, 2020
in
Python
#python-language-number
0
votes
Q: What are the functions in Python?
May 17, 2020
in
Python
#python-functions
0
votes
Q: What are the functions in Python
Dec 14, 2019
in
Python
#python-functions
0
votes
Q: Which Python Function Will You Use To Convert A Number To A String?
Dec 22, 2019
in
Python
#python-function
0
votes
Q: Write a program to display the Fibonacci sequence in Python?
May 17, 2020
in
Python
#python-fibonacci-sequence
0
votes
Q: Write Python code to check the given sequence is a palindrome or not?
May 17, 2020
in
Python
#python-palindrome-program
...