QuestionQ10

VerifiedFile Processing and Communicating with a Program’s Environment

What is the output of the following code?

Question Image

Explanation

ConfigParser section mappings expose values inherited from DEFAULT. Assigning one section mapping to another copies the visible options into the new section at that time, so PostgreSQL receives host = localhost. The later assignment overrides only MySQL's host, producing 127.0.0.1 followed by localhost.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!