07-25-2023, 10:37 AM
# In Python 3, range() returns a range object that generates numbers on-the-fly
numbers = range(5)
for num in numbers:
print(num) # Output: 0, 1, 2, 3, 4
numbers = range(5)
for num in numbers:
print(num) # Output: 0, 1, 2, 3, 4
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos