Suppose L is a list and T is a tuple. Evaluate the following Python statement…

Suppose L is a list and T is a tuple. Evaluate the following Python statement and choose the correct observation regarding its execution:
L.extend(T)

  1. A.

    Always valid

  2. B.

    Always invalid

  3. C.

    Always invalid

  4. D.

    Valid only if data types match in both (e.g., all integers or all strings)

Attempted by 955 students.

Sign up free to check your answer

Sign up free

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…