logo

AQA A-Level Computer Science practice

What is the result of [2, 4] + [6] in Python?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Lists in functional programming

Exam-style question

Try this first

What is the result of [2, 4] + [6] in Python?.

  1. A.[2, 4, 6]
  2. B.[6, 2, 4]
  3. C.[2, 4, [6]]
  4. D.6

Answer and explanation

Concise answer

[2, 4, 6]

Why this is correct

The + operator concatenates the two lists, so the item 6 is placed after the existing elements.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions