Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What is the output of the following?

    print('a'.maketrans('ABC', '123'))
  2. A.
    {97: 49, 98: 50, 99: 51}
    B.
    {65: 49, 66: 50, 67: 51}
    C.
    {97: 49}
    D.
    1

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    maketrans() is a static method so it's behaviour does not depend on the object from which it is being called.


Be The First To Comment