Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

range function

#this is the range() function
for a in range(7,1,-2): # range(start, stop, step)
                        #here 7 is maximum possible number
 print(a, end=", ")     #1 is minimum possible number but won't be included
                        # -2 is common diffrence between them
output:
7, 5, 3, 
+-+--++-+-+-+-+-+-+--++-+--+-++-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+--+
Comment

range() python

#can be used a sequence of numbers
x = range(6)
print(x)
#Outputs 0 1 2 3 4 5

for i in range(start,finish ,step) 
#gives range of numbers
#start is optional default is 0
#finish needed specifying when to stop
#step is incremetntaition of jump also optional
Comment

range() in python

Below is the syntax of the range() function. range(start, stop[, step])
Comment

the range() function

>>> for i in range(5):
...     print(i)
...
0
1
2
3
4
Comment

PREVIOUS NEXT
Code Example
Python :: python autoclicker 
Python :: numpy transpose 
Python :: python list to dict 
Python :: django model get field verbose name 
Python :: pip install mod_wsgi error 
Python :: to_cvs python 
Python :: python time limit for input 
Python :: How to get the date from week number in Python? 
Python :: python discord mention user 
Python :: python: convert variable as character 
Python :: check status code urllib open 
Python :: private instance attribute python 
Python :: Python program to count Even and Odd numbers using lambda 
Python :: length of int in python 
Python :: install google cloud python 
Python :: task timed out after 3.00 seconds aws lambda python 
Python :: python PyDrive service account credentials 
Python :: python sum lists element wise 
Python :: how to stop auto restart flask python 
Python :: pandas line plot dictionary 
Python :: find keys to minimum value in dict 
Python :: swap two columns python 
Python :: how to use css in php example 
Python :: selenium python has no attrirute getText 
Python :: Seaborn python for stacked column 
Python :: how to login using email in django 
Python :: console-based animation-simple 
Python :: matlab filter in python 
Python :: pygame make a window 
Python :: python escape character example 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =