Kit Library / Computer Science / Programming Fundamentals

Quick Kit

List in python

En 20 leveled MCQs 17 flashcards Free

Shared by a Veda learner · Generated with Veda AI

⚡ Veda Bites

The whole idea, one bite at a time

Veda Bites are swipeable micro-lessons — each one teaches exactly one idea. Here's a taste from this kit; the app has the full deck.

💡 Key Idea

What is a Python List?

The Swiss Army knife of data.

A list in Python is an ordered, mutable collection of items. It can hold elements of different types (integers, strings, even other lists) and is defined using square brackets `[]`. Lists are zero-indexed, meaning the first element is at index `0`.

↳ A Python list is an ordered, changeable sequence written as a comma-separated list inside square brackets.

📖 Definition

List Creation

Start with empty or filled.

Create a list by placing items inside `[]` separated by commas. An empty list is simply `[]` or using the `list()` constructor.

↳ Use square brackets or the list() constructor to create a list.

💡 Key Idea

Indexing and Negative Indexing

Start at 0, end at -1.

Access items by their position. The first item has index `0`, the second `1`, and so on. Python also supports negative indexing, where `-1` refers to the last item, `-2` to the second last, etc.

↳ Use positive indices from the start (0) and negative indices from the end (-1).

📖 Smart notes

What you'll study, topic by topic

1

Python Lists: Creation, Indexing, and Basic Operations

Python lists are ordered, mutable sequences defined with square brackets. They support indexing (including negative), slicing, and a variety of methods for adding, removing, and modifying items. List comprehensions offer...

  • Lists are created with square brackets `[]` and are zero-indexed.
  • Negative indexing starts from -1 (last item).
  • Slicing uses `[start:stop:step]` to extract sublists.

~8 min · full explanation, examples & memory tricks in the app

❓ Leveled MCQ practice

Try the smart MCQs from this kit

20 questions laddered from warm-up to topper-level, each with an explanation. A taste:

Which of the following correctly creates a list in Python?

Beginner
A list = {1, 2, 3} B list = [1, 2, 3] C list = (1, 2, 3) D list = <1, 2, 3>
Show answer & explanation

list = [1, 2, 3]

Square brackets `[]` are used to create a list in Python. Curly braces create a set, parentheses create a tuple, and angle brackets are not valid.

What is the index of the first element in a Python list?

Beginner
A 1 B 0 C -1 D None
Show answer & explanation

0

Python uses zero-based indexing, so the first element is at index 0.

Given `my_list = [10, 20, 30, 40]`, what does `my_list[-1]` return?

Beginner
A 30 B 40 C 20 D 10
Show answer & explanation

40

Negative indexing starts from the end; `-1` refers to the last element, which is 40.

What is the result of `len([1, 2, 3, 4])`?

Beginner
A 5 B 4 C Error D 3
Show answer & explanation

4

The `len()` function returns the number of elements in the list, which is 4.

🃏 Flashcards

Tap a card to flip it

17 flashcards in this kit — the app reviews them with spaced repetition so the right card returns on the right day.

Study it properly — free, in the app

The full Veda Bites deck, complete notes, spaced-repetition flashcards, leveled MCQs, tests and games for this kit — plus Daily Facts and the Arena, every day.