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!
Create your
free account
Assess your tech skills for free.
All fields are required.
Already have an account? Log In
Create your
free account
Get 8 tech competency assessments
for free
Hire top developers, faster
All fields are required.
Already have an account? Log In