61. What will be the output of the following Python code?
def foo(k):
k[0] = 1
q = [0]
foo(q)
print(q)
def foo(k):
k[0] = 1
q = [0]
foo(q)
print(q)62. What will be the output of the following Python code?
l=[2, 3, [4, 5]]
l2=l.copy()
l2[0]=88
l
l2
l=[2, 3, [4, 5]]
l2=l.copy()
l2[0]=88
l
l263. What will be the output of the following Python code?
x = [12, 34]
print(len(' '.join(list(map(int, x)))))
x = [12, 34]
print(len(' '.join(list(map(int, x)))))64. What will be the output of the following Python code?
x = [12.1, 34.0]
print(' '.join(list(map(str, x))))
x = [12.1, 34.0]
print(' '.join(list(map(str, x))))65. Which is the most appropriate definition for recursion?
66. What will be the output of the following Python code?
x=1
def cg():
global x
x=x+1
cg()
x
x=1
def cg():
global x
x=x+1
cg()
x67. What will be the output of the following Python code?
e="butter"
def f(a): print(a)+e
f("bitter")
e="butter"
def f(a): print(a)+e
f("bitter")68. What will be the output of the following Python code?
def change(one, *two):
print(type(two))
change(1,2,3,4)
def change(one, *two):
print(type(two))
change(1,2,3,4)69. In . . . . . . . . copy, the base address of the objects are copied. In . . . . . . . . copy, the base address of the objects are not copied.
70. What is called when a function is defined inside a class?
Read More Section(Functions in Python)
Each Section contains maximum 100 MCQs question on Functions in Python. To get more questions visit other sections.
