51. What is the maximum possible length of an identifier in Python?
52. What will be the output of the following Python code?
print("abc. DEF".capitalize())
print("abc. DEF".capitalize())
53. What will be the output of the following Python code?
i = 1
while True:
if i%3 == 0:
break
print(i)
i + = 1
i = 1
while True:
if i%3 == 0:
break
print(i)
i + = 1
54. Which of the following is a Python tuple?
55. What will be the output of the following Python code?
print('*', "abcde".center(6), '*', sep='')
print('*', "abcde".center(6), '*', sep='')
56. What will be the output of the following Python program?
def foo(x):
x[0] = ['def']
x[1] = ['abc']
return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
def foo(x):
x[0] = ['def']
x[1] = ['abc']
return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
57. What will be the output of the following Python code snippet?
for i in [1, 2, 3, 4][::-1]:
print (i)
for i in [1, 2, 3, 4][::-1]:
print (i)