Ram

Lesson 7 of 19

Lists & Dictionaries

Work with common Python collections.

Introduction

Lists store ordered values, while dictionaries store key-value pairs.

Both structures appear frequently in APIs, configuration, automation and application logic.

Key insight

Work with common Python collections.

Example

skills = ["Python", "React"]
profile = {"name": "Asha", "city": "Kathmandu"}
print(skills[0], profile["city"])

This example shows the core lists & dictionaries idea in a small, runnable program.

Real-world example

Lists & Dictionaries appears in everyday application code, scripts and APIs.

Test yourself

2-question check

1

What is the main idea in Lists & Dictionaries?

2

Where can lists & dictionaries be useful?

Ready to check your understanding?

Answer every question, then submit your quiz.

Try it yourself

Python compiler

Runs in your browser. Nothing is sent to a server.

Output appears here

First run downloads the Python runtime, so it may take a moment.

Practice challenge

Create a dictionary containing a project name and its technology stack.

Previous
Next