Home / Python Tips Generated By ChatGPT / The range() Function in Python Use range(start, stop, step) to generate a sequence of numbers, useful in loops. Source Code for i in range(0, 10, 2): print(i) # Even numbers from 0 to 8