Odoo Technical

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

How to remove a specific key-value pair from a dictionary

Avatar
pradicksha

.

Avatar
Discard
1 Answer
0
Avatar
priyanka
Best Answer

Using the "pop" method on a dictionary in Python is an appropriate way to remove a key-value pair.

For example:
values = {'name': 'Priya', 'age': 25}

values.pop('age', None)

output: values = {'name': 'Priya'}

Avatar
Discard