Q141
Open questionSelect 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
8/8
Page
Pick an option on a question to see the right answer and solution.
Q141
Open questionSelect an option to see the answer and solution.
Q142
Open questionprint('{:$}'.format(1112223334))Select an option to see the answer and solution.
Q143
Open questionprint('ab12'.isalnum())Select an option to see the answer and solution.
Q144
Open questionprint("ccdcddcd".find("c"))Select an option to see the answer and solution.
Q145
Open questionSelect an option to see the answer and solution.
Q146
Open questionprint('abef'.replace('cd', '12'))Select an option to see the answer and solution.
Q147
Open questionSelect an option to see the answer and solution.
Q148
Open question>>>print(format("Welcome", "10s"), end = '#')
>>>print(format(111, "4d"), end = '#')
>>>print(format(924.656, "3.2f"))Select an option to see the answer and solution.
Q149
Open questionprint('for'.isidentifier())Select an option to see the answer and solution.
Q150
Open questionprint('ab\ncd\nef'.splitlines())Select an option to see the answer and solution.
Q151
Open questionprint("xyyzxyzxzxyy".count('xyy', -10, -1))Select an option to see the answer and solution.
Q152
Open questionprint('xyyzxxyxyy'.lstrip('xyy'))Select an option to see the answer and solution.
Q153
Open questionprint('abcdefcdgh'.partition('cd'))Select an option to see the answer and solution.
Q154
Open questionprint('cd'.partition('cd'))Select an option to see the answer and solution.
Q155
Open questionprint("abc. DEF".capitalize())Select an option to see the answer and solution.
Q156
Open questionprint('abc'.encode())Select an option to see the answer and solution.
Q157
Open questionclass tester:
def __init__(self, id):
self.id = str(id)
id="224"
>>>temp = tester(12)
>>>print(temp.id)Select an option to see the answer and solution.
Q158
Open questionprint("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))Select an option to see the answer and solution.
Q159
Open question>>>print("D", end = ' ')
>>>print("C", end = ' ')
>>>print("B", end = ' ')
>>>print("A", end = ' ')Select an option to see the answer and solution.
Q160
Open questionprint('cba'.maketrans('abc', '123'))Select an option to see the answer and solution.