ExamVeda
Login
Home
51
What will be the output of the following Python code?
print("xyyzxyzxzxyy".count('xyy', -10, -1))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
52
What will be the output of the following Python code?
print('xyyzxxyxyy'.lstrip('xyy'))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following Python code?
print('abcdefcdgh'.partition('cd'))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
What will be the output of the following Python code snippet?
print('cd'.partition('cd'))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
55
What will be the output of the following Python code?
print("abc. DEF".capitalize())
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
56
What will be the output of the following Python code?
print('abc'.encode())
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
57
What will be the output of the following Python code?
class tester:
    def __init__(self, id):
        self.id = str(id)
        id="224"
 
>>>temp = tester(12)
>>>print(temp.id)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following Python code?
print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
59
What will be the output of the following Python code?
>>>print("D", end = ' ')
>>>print("C", end = ' ')
>>>print("B", end = ' ')
>>>print("A", end = ' ')
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
What will be the output of the following Python code?
print('cba'.maketrans('abc', '123'))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board