Report Bug

Qus

What will be the output of the following Python code?

print('a'.maketrans('ABC', '123'))
Qusनिम्नलिखित Python कोड का आउटपुट क्या होगा?


A. {97: 49, 98: 50, 99: 51}
B. {65: 49, 66: 50, 67: 51}
C. {97: 49}
D. 1


Solution
B. {65: 49, 66: 50, 67: 51}



Explanation
maketrans() is a static method so it’s behaviour does not depend on the object from which it is being called.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad