What is the output of the following expression? Sports = "Paralympic Games"…

2025

What is the output of the following expression? Sports = "Paralympic Games" print (Sports. Split ("m"))

  1. A.

    ['Paraly', '', 'pic Ga', 'm', 'es']

  2. B.

    ('Paraly', 'm', 'pic Games')

  3. C.

    ('Paraly', 'pic Ga', 'es')

  4. D.

    ['Paraly', 'pic Ga', 'es']

Attempted by 700 students.

Show answer & explanation

Correct answer: D

Step 1: The variable Sports is assigned the string "Paralympic Games". Step 2: The split() method is called with the delimiter "m". Step 3: The string is split at every occurrence of "m", including consecutive ones. Step 4: The split operation removes the delimiter and separates the string into parts. Step 5: The result is a list of substrings: ['Paraly', 'pic Ga', 'es']. Step 6: The output is a list, not a tuple, and does not include the delimiter as a separate element.

हिन्दी उत्तर: चर Sports को "Paralympic Games" स्ट्रिंग असाइन किया जाता है। Split() विधि को "m" के विभाजक के साथ कॉल किया जाता है। स्ट्रिंग को "m" के प्रत्येक उपस्थिति पर विभाजित किया जाता है। विभाजन विधि विभाजक को हटाती है और स्ट्रिंग को भागों में विभाजित करती है। परिणाम उप-स्ट्रिंग्स की एक सूची है: ['Paraly', 'pic Ga', 'es']। आउटपुट एक सूची है, न कि एक टुपल, और विभाजक को अलग तत्व के रूप में नहीं शामिल किया जाता है।

Explore the full course: Bpsc