निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following Python code snippet?
print('Ab!2'.swapcase())
A)
B)
C)
D)
Explanation:
The swapcase()
method changes uppercase letters to lowercase and vice versa. So, 'Ab!2'
becomes 'aB!2'
.
Answer: (C) aB!2