nerdexam
Juniper

JN0-224 · Question #52

Which Python code block is an example of a context manager?

The correct answer is C. with Device(host="vmx-1", user="lab", passwd="lab123") as device. You've hit your limit · resets 4am (America/New_York)

Python

Question

Which Python code block is an example of a context manager?

Options

  • Awhile True:
  • Btry:
  • Cwith Device(host="vmx-1", user="lab", passwd="lab123") as device:...
  • Dfor host in ["vmx-1", "vmx-2"]:

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    93% (27)

Explanation

You've hit your limit · resets 4am (America/New_York)

Topics

#context manager#Python#Device connection#with statement

Community Discussion

No community discussion yet for this question.

Full JN0-224 Practice