Correct option is D
The correct answer is
Python lists can contain different element types.
Important Key Points:
1.
Python lists are a
heterogeneous data structure, meaning they can contain elements of
different data types (e.g., integers, strings, objects).
2. Python lists are
mutable, meaning elements can be added, removed, or modified after the list is created.
3. Lists in Python can
contain other lists, allowing for
nested lists.
Knowledge Booster:
·
Option (a): Incorrect because Python lists can contain
elements of different types, making them very flexible.
·
Option (b): Incorrect as Python lists can hold
any data type, including strings, dictionaries, or even other lists.
·
Option (c): Incorrect because Python lists are
mutable; their contents can be changed after creation.
·
Option (e): Incorrect since Python lists can be
nested, meaning a list can contain other lists as elements, allowing for complex data structures.