So if I wish to compare numbers in Python, say, to check if the number falls in the inclusive range of 2 to 100.
Which of the following method is most preferable and why?
Using comparitive operators?
if(n>=2 and n<=100):
print("Okay")
or using range() function?
if(n in range(2,101)):
print("Okay")
Also would your answer change if the comparison if for very large numbers?