x = [34, 56]
print((''.join(list(map(str, x))),))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.
182
Questions
2/10
Page
Pick an option on a question to see the right answer and solution.
x = [34, 56]
print((''.join(list(map(str, x))),))Select an option to see the answer and solution.
x = [[0], [1]]
print(len(' '.join(list(map(str, x)))))Select an option to see the answer and solution.
x = ['ab', 'cd']
print(len(list(map(list, x))))))Select an option to see the answer and solution.
l1=[1, 2, 3, [4]]
l2=list(l1)
id(l1)==id(l2)Select an option to see the answer and solution.
def display(b, n):
while n > 0:
print(b,end="")
n=n-1
display('z',3)Select an option to see the answer and solution.
def foo(fname, val):
print(fname(val))
foo(max, [1, 2, 3])
foo(min, [1, 2, 3])Select an option to see the answer and solution.
def cube(x):
return x * x * x
x = cube(3)
print xSelect an option to see the answer and solution.
Select an option to see the answer and solution.
def f1():
global x
x+=1
print(x)
x=12
print("x")Select an option to see the answer and solution.
l1=[10, 20, 30]
l2=l1
id(l1)==id(l2)
l2=l1.copy()
id(l1)==id(l2)Select an option to see the answer and solution.
Select an option to see the answer and solution.
def fact(num):
if num == 0:
return 1
else:
return _____________________Select an option to see the answer and solution.
def fun(n):
if (n > 100):
return n - 5
return fun(fun(n+11));
print(fun(45))Select an option to see the answer and solution.
list(map((lambda x:x**2), filter((lambda x:x%2==0), range(10))))Select an option to see the answer and solution.
def my_function(a, b):
return a / b
result = my_function(4, 2)
print(result)Select an option to see the answer and solution.
a = [1, 2, 3, 4, 5]
b = lambda x: (b (x[1:]) + x[:1] if x else [])
print(b (a))Select an option to see the answer and solution.
Select an option to see the answer and solution.
x = ['ab', 'cd']
print(len(list(map(list, x))))Select an option to see the answer and solution.
Select an option to see the answer and solution.
list(map((lambda x:x^2), range(10)))Select an option to see the answer and solution.