From the following given syntax, which of them is the correct syntax to make a dictionary using the dict () inbuilt function?

10. From the following given syntax, which of them is the correct syntax to make a dictionary using the dict () inbuilt function?

  1. Dict = dict{1: 'hello', 2: 'everyone'}
  2. Dict = dict(1: 'hello', 2: 'everyone')
  3. Dict = dict({1: 'hello', 2: 'everyone'})

Answer: C) Dict = dict({1: 'hello', 2: 'everyone'})

Explanation:

Dict = dict({1: 'hello', 2: 'everyone'}) is the correct syntax to make a dictionary using dict() inbuilt function.

Comments and Discussions!

Load comments ↻






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