मराठी

Assuming that D1 is a dictionary in Python. Write a Python expression to check if the key, ‘RNo’ is present in D1. - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Assuming that D1 is a dictionary in Python.

Write a Python expression to check if the key, ‘RNo’ is present in D1.

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

उत्तर

'RNo' in D1

This expression returns True if the key is present in the dictionary and False otherwise. It is the most efficient and standard way to verify the existence of a key in Python.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×