Free PCEP-30-02 Exam Braindumps (page: 20)

Page 19 of 99

Insert the correct snippet to convert the t tuple to a dictionary named d.
Expected output:

Code:

  1. t >> d.dict
  2. d = dict(t)
  3. d.dict(t)
  4. d = t(dict)

Answer(s): B



How many elements does the my_list list contain?

  1. one
  2. three
  3. two

Answer(s): C



What is the expected output of the following code?

  1. 7 23 42
  2. 7 42 23
  3. 42 23 7

Answer(s): B



What is the expected output of the following code?

  1. {(2, 3): 2}
  2. {(1, 2): 1}
  3. The code is erroneous.
  4. 1

Answer(s): D






Post your Comments and Discuss Python Institute PCEP-30-02 exam with other Community members:

PCEP-30-02 Discussions & Posts