71. What will be the output of the following Python code snippet?
print('\t'.isspace())
print('\t'.isspace())
72. What will be the output of the following Python code snippet?
print('xyyxyyxyxyxxy'.replace('xy', '12', 0))
print('xyyxyyxyxyxxy'.replace('xy', '12', 0))
73. To concatenate two strings to a third what statements are applicable?
74. If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.
75. What will be the output of the following Python code snippet?
print('{:#}'.format(1112223334))
print('{:#}'.format(1112223334))
76. Which of the following statement prints hello\example\test.txt?
77. What will be the output of the following Python code snippet?
print('abc'.islower())
print('abc'.islower())
78. What will be the output of the following Python statement?
>>>print(chr(ord('b')+1))
>>>print(chr(ord('b')+1))
79. What will be the output of the following Python code?
print("abcdef".center(10, '12'))
print("abcdef".center(10, '12'))
80. What will be the output of the following Python code?
print("Hello {0} and {1}".format('foo', 'bin'))
print("Hello {0} and {1}".format('foo', 'bin'))
Read More Section(Strings in Python)
Each Section contains maximum 100 MCQs question on Strings in Python. To get more questions visit other sections.