Skip to content
UPEEC

list(), tuple(), set() and dict()

Build collections from any iterable.

Beginner
Comments 0
list(range(3))                # [0, 1, 2]
set("hello")                  # {'h', 'e', 'l', 'o'}
dict(zip(["R1", "R2"], [220, 470]))

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.