Quiz Catalog

Catalog of quizzes

scores: dict = {'John': 99, 'Danny': 95}
iter_scores = iter(scores)

print(type(iter_scores))
<class 'dict_keyiterator'>
  • iterator
  • build-in/type
  • build-in/dict

lst = [(2, 3), (2, 9), (5, 0)]

a = dict(lst)

print(a)
{2: 9, 5: 0}
  • build-in/dict
  • build-in/int
  • list/literal
  • tuple/literal

def func(**kwargs):
  return kwargs

test = func(a=1, b=2, c=3)

print(test)
{'a': 1, 'c': 3, 'b': 2}
  • function
  • build-in/dict

def func(**kwargs):
  return kwargs

print(func())
{}
  • function
  • build-in/dict