1. Home
  2. Data Science
  3. Python
  4. Which approach is generally faster for concatenating many…

Added 25 Nov 2026

Which approach is generally faster for concatenating many strings in a loop in Python?

  1. Using += repeatedly
  2. Using + inside a nested loop
  3. ''.join(list_of_strings) Correct answer
  4. Using format() each time

Correct answer

C. ''.join(list_of_strings)

7 views

MCQSEXAM

Explanation

join builds the result in a single pass, avoiding repeated copying.

Reference

Asked in: Python Interview Advanced

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs