How do you use the get() function to access the pair values?

15. How do you use the get() function to access the pair values?

  1. D={1:7,2:"everyone"}
    print(D.get(2))
  2. D={1:7,2:"everyone"}
    print(D=get(2))
  3. D={1:7,2:"everyone"}
    print(get(2))

Answer: A) D={1:7,2:"everyone"}
print(D.get(2))

Explanation:

The correct syntax to use the get() function is:

D = {1:7,2:"everyone"}
print(D.get(2))

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.