CBSE Class 11 Computer Science Question 26 of 91

String Manipulation — Question 16

Back to all questions
16
Question

Question 16

Select the correct output of the following String operations.

str = "my name is Anu John"
print(str.capitalize())
  1. 'My name is anu john' ✓
  2. TypeError: unsupported operand type(s) for * : 'str' and 'int'
  3. 'My name is Anu John'
  4. 'My Name Is Anu John'
Answer