What will be the output of the following Python code snippet? print('+99'.zfill(5)) a) 00+99 b) 00099
View Question
What will be the output of the following Python code snippet?
print(‘ab’.zfill(5))
What will be the output of the following Python code snippet? print('ab'.zfill(5)) a) 000ab b) ...
View Question
What will be the output of the following Python code snippet?
print(‘abcd’.translate({‘a’: ‘1’, ‘b’: ‘2’, ‘c’: ‘3’, ‘d’: ‘4’}))
What will be the output of the following Python code snippet? print('abcd'.translate({'a': '1', 'b': '2', 'c': '3', 'd': ...
View Question
What will be the output of the following Python code snippet?
print(‘abcd’.translate({97: 98, 98: 99, 99: 100}))
What will be the output of the following Python code snippet? print('abcd'.translate({97: 98, 98: 99, 99: 100})) a) ...
View Question
What will be the output of the following Python code snippet?
print(‘abcd’.translate(‘a’.maketrans(‘abc’, ‘bcd’)))
What will be the output of the following Python code snippet? print('abcd'.translate('a'.maketrans('abc', 'bcd'))) a) ...
View Question
What will be the output of the following Python code snippet?
print(‘ab cd-ef’.title())
What will be the output of the following Python code snippet? print('ab cd-ef'.title()) a) Ab ...
View Question
What will be the output of the following Python code snippet?
print(‘ab cd ef’.title())
What will be the output of the following Python code snippet? print('ab cd ef'.title()) a) ...
View Question
What will be the output of the following Python code snippet?
print(‘Ab!2’.swapcase())
What will be the output of the following Python code snippet? print('Ab!2'.swapcase()) a) ...
View Question
What will be the output of the following Python code snippet?
print(‘ab\ncd\nef’.splitlines())
What will be the output of the following Python code snippet? print('ab\ncd\nef'.splitlines()) a) [‘ab’, ‘cd’, ...
View Question
What will be the output of the following Python code snippet?
print(‘abcdefcdghcd’.split(‘cd’, 2))
What will be the output of the following Python code snippet? print('abcdefcdghcd'.split('cd', 2)) a) [‘ab’, ...
View Question