Can i automate range()?
I have written a simple code i.e a=0 b=10 for i in range(a,b): if i==20: print("jackpot") Now, as you can see, i is never gonna be 20, right? So my query is that, is it possible to automate the a and b variable in range()..by making a=b and increasing 'b' until it reaches 20? I am asking this question because, in certain problem solving questions it is asked to find out the largest number etc. , And for this purpose we need to change the range([max]) again and again if the largest number is in a larger range. So i was thinking about the above question.. If it's possible, help me!