How to Make Range Inclusive in Python

Spread the love

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.

Leave a Comment