Computer Science
A copy of the dictionary where the copy of the keys as well as the values is created for the new dictionary, is called …………… copy.
- key copy
- shallow copy
- deep copy
- partial copy
Python Dictionaries
1 Like
Answer
deep copy
Reason — A deep copy constructs a new compound object and then, recursively, inserts copies into it of the objects found in the original.
Answered By
1 Like
Related Questions
Which of the following will raise an error if the given dictionary is empty ?
- del statement
- pop( )
- popitem( )
- all of these
A copy of the dictionary where only the copy of the keys is created for the new dictionary, is called …………… copy.
- key copy
- shallow copy
- deep copy
- partial copy
Which of the following is correct with respect to above Python code ?
d = {"a" : 3,"b" : 7}- a dictionary d is created.
- a and b are the keys of dictionary d.
- 3 and 7 are the values of dictionary d.
- All of these.
What would the following code print ?
d = {'spring':'autumn','autumn':'fall','fall':'spring'} print(d['autumn'])- autumn
- fall
- spring
- Error