Which of the following pair of symbols is used for multi-line strings in Python?
2026
Which of the following pair of symbols is used for multi-line strings in Python?
- A.
Pair of '' (Single Quotes)
- B.
Pair of # (Hash)
- C.
Pair of """ (Triple Quotes)
- D.
Pair of ! (Exclamation)
Attempted by 549 students.
Show answer & explanation
Correct answer: C
In Python, multi-line strings are defined using triple quotes (either ''' or """). This syntax allows the string to span multiple lines without requiring explicit newline escape characters.