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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
