Advertisements
Advertisements
प्रश्न
Select the correct output of the code:
S="Amrit Mahotsav @ 75"
A=S.partition (" ")
print(a)विकल्प
(‘Amrit Mahotsav’, ‘@’, ‘75’)[‘Amrit’, ‘Mahotsav’, ‘@’, ‘75’](‘Amrit’, ‘Mahotsav @ 75’)(‘Amrit’, “, ‘Mahotsav @ 75’)
MCQ
Advertisements
उत्तर
(‘Amrit’, “, ‘Mahotsav @ 75’)
Explanation:
The partition() method looks for the first occurrence of the specified string and divides the string into a tuple with three elements. In this case, the specified string is a space (" "), so:
- The first element includes the part before the specified string (space).
- The second element contains the specified string itself (space).
- The third element holds the part after the specified string (space).
shaalaa.com
Read and Write a CSV File Using Python
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
