Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
range() function in Python 3
#1
# 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
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Backward Incompatibility in Python 3 Qomplainerz 0 280 07-25-2023, 10:40 AM
Last Post: Qomplainerz
  Async/Await in Python 3 Qomplainerz 0 212 07-25-2023, 10:39 AM
Last Post: Qomplainerz
  Keyword-Only Arguments in Python 3 Qomplainerz 0 204 07-25-2023, 10:39 AM
Last Post: Qomplainerz
  Type Annotations in Python 3 Qomplainerz 0 231 07-25-2023, 10:38 AM
Last Post: Qomplainerz
  Dictionary views in Python 3 Qomplainerz 0 206 07-25-2023, 10:38 AM
Last Post: Qomplainerz
  Print formatting in Python 3 Qomplainerz 0 215 07-25-2023, 10:38 AM
Last Post: Qomplainerz
  Syntax changes in Python 3 Qomplainerz 0 222 07-25-2023, 10:37 AM
Last Post: Qomplainerz
  input() function in Python 3 Qomplainerz 0 226 07-25-2023, 10:37 AM
Last Post: Qomplainerz
  Integer division in Python 3 Qomplainerz 0 212 07-25-2023, 10:36 AM
Last Post: Qomplainerz
  Unicode support in Python 3 Qomplainerz 0 213 07-25-2023, 10:36 AM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 2 Guest(s)