Correct Answer: C
A. False
Both lists and tuples in Python are implemented using contiguous memory (array-like structures).
Tuples are not linked lists. Immutability of tuples is a design property, not achieved via linked list structure.
Example:
L = [1,2,3]
T = (1,2,3)
Both are stored as arrays of references, not linked nodes.
Hence the statement is incorrect.
B. False
Appending to a list is amortized O(1) due to over-allocation of memory.
Appending to a list is amortized O(1) because most insertions happen in constant time when there is already extra space available.
Python uses over-allocation, meaning it increases the list size by more than needed during resizing, so future appends don’t require copying every time.
Occasionally, when the list becomes full, it resizes and copies elements (O(n)), but this happens rarely.
Because these costly operations are spread over many cheap ones, the average (amortized) time per append remains O(1).
In short, most insertions are O(1), and only occasional resizing takes O(n), so the amortized cost per insertion is O(1).
However, when the allocated space is exhausted, resizing occurs, requiring copying of all elements, which takes O(n) time.
Therefore, worst-case time complexity is not O(1).
So, appending to a list is amortized O(1), but worst-case time complexity is O(n) due to resizing.
Example:
L = [1,2,3]
# When capacity is full:
L.append(4) # may trigger resizing → O(n)
C. True
Lists allocate extra memory (over-allocation) to allow efficient appends, which increases memory usage.
Tuples, being immutable, do not require such extra space and are stored more compactly.
Hence, tuples are generally more memory-efficient than lists.
D. False
The "is" operator checks whether two variables refer to the same object in memory, not whether their values are equal.
Two tuples with identical contents may or may not refer to the same object, depending on Python's internal optimizations.
Thus, it is not always true.
Example:
a = (1,2)
b = (1,2)
print(a is b) # not guaranteed True
print(a == b) # always True
Special Case:
(1,2) is ((1,2)) # True
Reason: Extra parentheses do not create a new tuple; it refers to the same object.
Key Trick:
"is" → same memory (identity)
"==" → same value (equality)
z