Test Index
Python Revision Tour
© examsnet.com
Question : 23 of 102
Marks:
+1,
-0
Assertion (A): The
upper() function/method in Python returns the string with all lowercase letters of the given string converted to uppercase.Reason (R): Strings are mutable objects in Python.[CBSE 2026 Compartment]
Solution:
Concept:
s.upper() returns a new string with lowercase letters changed to uppercase; the original string is not changed because strings are immutable.Explanation:s = 'Hello't = s.upper()print(t) # HELLOprint(s) # HelloAssertion: true.Reason: false. Strings are immutable;
s[0] = 'J' gives a TypeError.Answer:Option C (Assertion (A) is true, but Reason (R) is false.)© examsnet.com
Go to Question: