1Given the following Python code, what gets printed?
colors1 = {
"apples": "Green",
}
colors2 = colors1
colors2["apples"] = "Yellow"
print('colors1:', colors1)
print('colors2:', colors2)
This test assesses your advanced skills in the Python programming language (up to v3.11).
Topics: generators, iterators, lists, sets, dicts, reference-or-value, Python-2-vs-3, OOP, magic-methods, logging, threading.
colors1 = {
"apples": "Green",
}
colors2 = colors1
colors2["apples"] = "Yellow"
print('colors1:', colors1)
print('colors2:', colors2)
What will be your
role in the community?
Join the SkillValue Community!