A

Admin • 825.56K Points
Coach

Q. What will `dict([(1, 'a'), (2, 'b')])` return?

  • (A) {1: 'a', 2: 'b'}
  • (B) [(1, 'a'), (2, 'b')]
  • (C) {(1, 'a'), (2, 'b')}
  • (D) Syntax Error

Explanation by: Admin
`dict()` can be created from a list of key-value tuples.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.