Explore Connect Documentation
Snippets

Computing with Data

elgeish
665K views
GitHub

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content
Previous: Lists Next: Slicing

Ranges

The built-in function range is often used to access a list of evenly-spaced integers:

1
2
3
4
5
print(list(range(0, 10, 1)))
print(tuple(range(0, 10))) # same as tuple(range(0, 10, 1))
print(tuple(range(10))) # same as tuple(range(0, 10))
print(tuple(range(0, 10, 2))) # step size of 2
Press desired key combination and then press ENTER.
Suggested playgrounds

Programmieraufgabe 1 - Quersumme

By
ferenc-hechler
665
0

getting started with Python

By
AlexCoussediere
204
4

PYTHON: BEGINNER QUIZ (10 Questions)

By
Code-Parser
8,437
445

Simple Python Test

By
Jouj_
5,428
56
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content