Alter dictionary
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 2 )
Simply use the following line of code:
MariaMarks[“Physics”]=20
1. Use Update() to either update existing record or add new record (key – value pair) in dictionary.
MariaMarks.update({“Physics” : 20})
2. MariaMarks[“Physics”]=20