Computer Science
Guess the correct output of the following String operations.
str1 = 'Wah'
print(str1*2)
- WahWah
- TypeError: unsupported operand type(s) for * : 'str' and 'int'
- WWaahh
- Wah2
Python String Manipulation
8 Likes
Answer
WahWah
Answered By
2 Likes
Related Questions
Choose the correct function to get the ASCII code of a character.
Which method should I use to convert String "Python programming is fun" to "Python Programming Is Fun" ?
What is the output of the following string operation?
str = "My roll no. is 12" print(str.isalnum())
Select the correct output of the following String operations.
str1 = 'Waha' print(str1[:3] + 'Bhyi' + str1[-3:])