ExamVeda
Login
Home
21
What will be the output of the following Python code snippet?
print('Hello World'.istitle())
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
22
What will be the output of the following Python code?
>>>str1="helloworld"
>>>str1[::-1]
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
23
What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd', -1))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
24
What will be the output of the following Python code?
print('abcd'.partition('cd'))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
25
What will be the output of the following Python code snippet?
print('ab cd-ef'.title())
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
26
What will be the output of the following Python code?
print("Hello {name1} and {name2}".format(name1='foo', name2='bin'))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
27
What will be the output of the following Python statement?
>>>"a"+"bc"
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
28
What will be the output of the following Python statement?
>>> print('x\97\x98')
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
29
What is "Hello".replace("l", "e")?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
30
Given a string example="hello" what is the output of example.count('l')?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board