10 Questions
what will be the output of the following code? str="Hello" str='str' print(str)
str
what will be the output of the following code? str="Welcome to"python""programming" print(str)
Welcome to "python" programming
what will be the output of the following code? str="Welcome" l=len(str) print(l)
7
what is the index value of 'm' in string "Welcome"?
5
which operator is used for string concatenataion?
what is the output of the following code? print("gift[1:2])
i
strings are immutable in python
True
what is the output of the following code? str="My age is 23"; print(str.isalnum())
false
the index of the first character of a string is 0.
True
what will be the output of the following code? print('abc'+3)
error
Test your knowledge of Python string operations with this quiz. Questions cover topics like string assignment, length calculation, index value, string concatenation, and slicing.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free