Master Mathematics.

Programming · Python, C & Pseudocode · Problem 4

Joining two Python lists

Consider the Python lists A=[1,2,3] and B=[4,5,6]. Which statement 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)

Source: GATE DA