Question: PYTHON Assume that the variable data refers to the dictionary {b:20, a:35}. Write the expressions that perform the following tasks: A: Replace the value at
PYTHON
Assume that the variable data refers to the dictionary {b:20, a:35}. Write the expressions that perform the following tasks:
A: Replace the value at the key b in data with that values negation.
B: Add the key/value pair c:40 to data.
C: Remove the value at key b in data, safely.
D: Print the keys in data in alphabetical order.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
