PCPP-32-101 · Question #90
What is the result of the following code?
The correct answer is A. 127.0.0.1. config['postgresql'] is assigned as a reference to the same dictionary as config['mysql']. Changing config['mysql']['host'] also changes config['postgresql']['host']. Therefore, both print statements output 127.0.0.1. Exam Questions, Study Guides, Practice Tests. Lead the way…
Question
What is the result of the following code?
Exhibit
Options
- A127.0.0.1
- BAn exception will be raised.
- C127.0.0.1
- Dlocalhost
How the community answered
(51 responses)- A80% (41)
- B12% (6)
- C6% (3)
- D2% (1)
Explanation
config['postgresql'] is assigned as a reference to the same dictionary as config['mysql']. Changing config['mysql']['host'] also changes config['postgresql']['host']. Therefore, both print statements output 127.0.0.1. Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, Microsoft, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test, First Pass. Help you to pass any IT Certification exams at the first try. You can reach us at any of the email addresses listed below. Any problems about IT certification or our products, you could rely upon us, we will give you satisfactory answers in 24 hours.
Topics
Community Discussion
No community discussion yet for this question.
