ExamVeda
Login
Home
31
What will be the output of the following Python code snippet?
print('abcd'.translate({97: 98, 98: 99, 99: 100}))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
32
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
33
What will be the output of the following Python code?
class Count:
    def __init__(self, count = 0):
       self.__count = count
 
c1 = Count(2)
c2 = Count(2)
print(id(c1) == id(c2), end = " ")
 
s1 = "Good"
s2 = "Good"
print(id(s1) == id(s2))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
34
What will be the output of the following Python code?
print("ab\tcd\tef".expandtabs(4))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
35
What will be the output of the following Python code?
print("Hello {0!r} and {0!s}".format('foo', 'bin'))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
36
What will be the output of the following Python code?
print('Hello!2@#World'.istitle())
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
What will be the output of the following Python code snippet?
print('abef'.partition('cd'))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
38
What will be the output of the following Python code?
print('*', "abcdef".center(7), '*', sep='')
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
39
What will be the output of the following Python code snippet?
print('11'.isnumeric())
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
What will be the output of the following Python code snippet?
print('HelloWorld'.istitle())
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board