मराठी

Assuming that D1 is a dictionary in Python. Write a Python expression to check if any key in D1 has a value 12. - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Assuming that D1 is a dictionary in Python.

Write a Python expression to check if any key in D1 has a value 12.

अति संक्षिप्त उत्तर
Advertisements

उत्तर

To check if the value 12 is present in the dictionary D1, you can use the in operator along with the .values() method.
12 in D1.values()
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×