Advertisements
Advertisements
प्रश्न
Identify the correct output of the following code snippet:
game="olympic2024"
print(game.index("C"))विकल्प
06−1ValueError
MCQ
Advertisements
उत्तर
ValueError
Explanation:
The character ‘C’ does not exist in the string "olympic2024". Since the index() method raises an error when the specified character is not found; a ValueError is returned.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
