Skip to content
doubtly

1 answer

Best answer

Answer: A Python list is an ordered, mutable sequence that can hold items of any type, written inside square brackets.

Key features of a list:

  1. Ordered: items keep the order in which they are stored, and each has an index starting from 0. Negative indices count from the end (L[-1] is the last item).
  2. Mutable: items can be changed, added or removed after the list is created, e.g. L[0] = 5, L.append(7), L.remove(5).
  3. Heterogeneous: one list can hold different data types, e.g. [10, "Ram", 45.5, True].
  4. Allows duplicates: the same value can appear more than once.
  5. Dynamic size: a list grows or shrinks as items are added or deleted.
  6. Supports slicing and operators: L[1:4], concatenation with +, repetition with *, membership with in.
  7. Can be nested: a list can contain other lists, e.g. [[1, 2], [3, 4]].
  8. Built-in methods: append(), extend(), insert(), pop(), sort(), reverse(), count(), index(), and functions like len(), max(), min().
marks = [78, 85, 92]
marks.append(66)
print(marks[0], marks[-1])   # 78 66
Doubtly AI · 24 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Practise this chapter

Accountancy

Your answer

Log in or create a free account to answer this question.