GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2025

GATE 2025 · DA · MCQ · 1 mark · Programming, Data Structures and Algorithms › Python Programming

GATE 2025 Data Science and Artificial Intelligence question: Consider the following Python declarations of two lists. code Which one of the following…

Consider the following Python declarations of two lists.

A=[1,2,3]
B=[4,5,6]

Which one of the following statements results in A= [1, 2, 3, 4, 5, 6]?

  1. (A)

    A.extend(B)

  2. (B)

    A.append(B)

  3. (C)

    A.update(B)

  4. (D)

    A.insert(B)

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion