Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

call a Python range() using range(start, stop, step)

# welcome to softhunt.net
# Python program to
# print all number
# divisible by 5 and 7

# using range to print number
# divisible by 5
print('divisible by 5: ')
for i in range(0, 30, 5):
	print(i, end=" ")
print()

# using range to print number
# divisible by 7
print('divisible by 7: ')
for i in range(0, 50, 7):
	print(i, end=" ")
print()
Comment

call a Python range() using range(stop)

# welcome to softhunt.net
# Python program to
# print whole number
# using range()

# printing first 5
# whole number
print('printing first 5: ')
for i in range(5):
	print(i, end=" ")
print()

# printing first 10
# whole number
print('printing first 10 :')
for i in range(10):
	print(i, end=" ")
print()
Comment

call a Python range() using range(start, stop)

# welcome to softhunt.net
# Python program to
# print natural number
# using range

# printing a natural
# number upto 20
print('printing a natural upto 20 :')
for i in range(1, 21):
	print(i, end=" ")
print()

# printing a natural
# number from 5 to 20
print('printing a natural from 10 to 20 :')
for i in range(10, 21):
	print(i, end=" ")
print()
Comment

PREVIOUS NEXT
Code Example
Python :: write text in list to text file python 
Python :: timeit jupyter 
Python :: merge on row number python 
Python :: python regex cheat sheet 
Python :: how to check if file exists pyuthon 
Python :: declare numpy zeros matrix python 
Python :: python code to remove file extension 
Python :: sort list of numbers python 
Python :: completely uninstall python and all vritualenvs from mac 
Python :: selenium chromeoptions user agent 
Python :: input array of string in python 
Python :: stdout.write python 
Python :: python print for loop one line 
Python :: how to add a cooment in python 
Python :: python obtain data from pandas dataframe without index name 
Python :: How many columns have null values present in them? in pandas 
Python :: apostrophe in python 
Python :: pyspark check all columns for null values 
Python :: how to multiply two arrays in python 
Python :: read json file 
Python :: decorator python 
Python :: python ascii 
Python :: django file upload this field is required 
Python :: pygame music player 
Python :: how to import a python function from another file 
Python :: how to check whole number in python 
Python :: reverse geocode python 
Python :: python choose sample from list with replacement 
Python :: Count NaN values of an DataFrame 
Python :: string hex to decimal python 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =