Q121
Open questionprint('Hello World'.istitle())Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
160
Questions
7/8
Page
Pick an option on a question to see the right answer and solution.
Q121
Open questionprint('Hello World'.istitle())Select an option to see the answer and solution.
Q122
Open question>>>str1="helloworld"
>>>str1[::-1]Select an option to see the answer and solution.
Q123
Open questionprint('abcdefcdghcd'.split('cd', -1))Select an option to see the answer and solution.
Q124
Open questionprint('abcd'.partition('cd'))Select an option to see the answer and solution.
Q125
Open questionprint('ab cd-ef'.title())Select an option to see the answer and solution.
Q126
Open questionprint("Hello {name1} and {name2}".format(name1='foo', name2='bin'))Select an option to see the answer and solution.
Q127
Open question>>>"a"+"bc"Select an option to see the answer and solution.
Q128
Open question>>> print('x\97\x98')Select an option to see the answer and solution.
Q129
Open questionSelect an option to see the answer and solution.
Q130
Open questionSelect an option to see the answer and solution.
Q131
Open questionprint('abcd'.translate({97: 98, 98: 99, 99: 100}))Select an option to see the answer and solution.
Q132
Open questionprint('ab cd ef'.title())Select an option to see the answer and solution.
Q133
Open questionclass 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))Select an option to see the answer and solution.
Q134
Open questionprint("ab\tcd\tef".expandtabs(4))Select an option to see the answer and solution.
Q135
Open questionprint("Hello {0!r} and {0!s}".format('foo', 'bin'))Select an option to see the answer and solution.
Q136
Open questionprint('Hello!2@#World'.istitle())Select an option to see the answer and solution.
Q137
Open questionprint('abef'.partition('cd'))Select an option to see the answer and solution.
Q138
Open questionprint('*', "abcdef".center(7), '*', sep='')Select an option to see the answer and solution.
Q139
Open questionprint('11'.isnumeric())Select an option to see the answer and solution.
Q140
Open questionprint('HelloWorld'.istitle())Select an option to see the answer and solution.