Advertisements
Advertisements
प्रश्न
Assertion (A): The expression "HELLO".sort()
in Python will give an error.
Reason (R): sort()
does not exist as a method/function for strings in Python.
विकल्प
Both (A) and (R) are true and (R) is the correct explanation for (A).
Both (A) and (R) are true and (R) is not the correct explanation for (A).
(A) is true but (R) is false.
(A) is false but (R) is true.
MCQ
अभिकथन और तर्क
उत्तर
Both (A) and (R) are true and (R) is the correct explanation for (A).
Explanation:
The sort() function does not work for strings, hence the command will return an error. The claim and reason statements are true and logical.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (February) Set 4