I will use the range function as the main example in this question.
I use range a lot to generate a list of numbers. However, I use it often with different parameters, specifically a different NUMBER of parameters. It makes me wonder how range easily handles different numbers of parameters and assigns them to their respective value (if they represent the highest value, or the smallest value, or the interval between values). How does range do this? Does it use if statements to handle each scenario, or is there a more efficient way?
 
     
     
     
    