Skip to content
Question

Q.Consider the statements given below and then choose the correct output from the given options:
L=['TIC', 'TAC']  
print(L[::-1])  
(A) ['CIT', 'CAT'] (B) ['TIC', 'TAC'] (C) ['CAT', 'CIT'] (D) ['TAC', 'TIC']

CBSECBSE Class XII Board 2025MCQ· 1mImportance★★★★★
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

The slice [::-1] reverses the order of elements in the list, not the characters within each string, so ['TIC', 'TAC'] becomes ['TAC', 'TIC'].

When you work with lists in Python, slicing notation gives you powerful control over which elements you extract and in what order. The general form [start:stop:step] lets you specify where to begin, where to end, and how to move through the list. The step parameter is the key here.

A step of -1 tells Python to walk backward through the list. So L[::-1] means "start at the end, go to the beginning, taking steps of -1"—in other words, reverse the entire list. Crucially, this operation reverses the sequence of elements, not the contents of individual elements.

In the given code, L is a list containing two strings: 'TIC' and 'TAC'. When you apply [::-1], Python flips the order of these two items. The first element 'TIC' moves to the second position, and the second element 'TAC' moves to the first position. The strings themselves remain unchanged—'TIC' is still 'TIC', not 'CIT'. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.