Skip to content
Home » How to Make Range Inclusive in Python

How to Make Range Inclusive in Python

  • by

Did you ever use the range() function in Python? if you are a beginner so, maybe yes or no, else you are an advanced developer so, surely you used. Here you will get some access to how you make range inclusive in Python.

Make Range Inclusive in Python

def range1(start, end):
	return range(start, end+1)

print(range1(1, 10))

Output:
range(1, 11)

So, I have done it with the above-mentioned example for you.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *