41. What will be the output of the following Python code?
D=dict(p='Exam', q='Veda')
'{p}{q}'.format(**D)
D=dict(p='Exam', q='Veda')
'{p}{q}'.format(**D)
42. What will be the output of the following Python code?
'{a}{b}{a}'.format(a='hello', b='world')
'{a}{b}{a}'.format(a='hello', b='world')
43. In Python, what is the role of the @functools.lru_cache decorator?
44. What is the purpose of a decorator in Python?
45. What will be the output of the following Python code snippet?
x=3.3456789
'%f | %e | %g' %(x, x, x)
x=3.3456789
'%f | %e | %g' %(x, x, x)
46. Which of the following formatting options can be used in order to add 'n' blank spaces after a given string 'S'?
47. What will be the output of the following Python code?
s='%s, %s & %s'
s%('mumbai', 'kolkata', 'delhi')
s='%s, %s & %s'
s%('mumbai', 'kolkata', 'delhi')
48. In Python, what is the primary use of the super() function in a subclass constructor?
49. In Python, what is the purpose of the @property decorator?
50. What will be the output of the following Python code?
def ordi():
print("Ordinary")
ordi
ordi()
def ordi():
print("Ordinary")
ordi
ordi()