ExamVeda
Login
Home
51
What will be the output of the following Python code?
print('a'.maketrans('ABC', '123'))
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 snippet?
print('abcdefcdghcd'.split('cd', 0))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following Python code?
print("Hello {} and {}".format('foo', 'bin'))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
54
What will be the output of the following Python statement?
>>>"abcd"[2:]
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
55
What will be the output of the following Python code?
print("Hello {name1} and {name2}".format('foo', 'bin'))
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 snippet?
print('0xa'.isdigit())
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
57
The output of executing string.ascii_letters can also be achieved by:
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following Python code snippet?
print('{:,}'.format(1112223334))
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('{0:.2%}'.format(1/3))
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("abcdef".center(7, '1'))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board