Quiz Catalog

Catalog of quizzes

a = {}

print(type(a))
<class 'dict'>
  • dict
  • type
  • build-in/type

d = {
  [1,2]: [3,4],
  (1): [1, 2]
}
print(d.items())
TypeError: unhashable type: 'list'
  • dict

data = {"age": 30, "name": "Bob"}

print("age" in data)
True
  • expression/operation/in
  • dict

data = [2, 4, 5, 6, {}]

a = isinstance(data[4], dict)

print(a)
True
  • build-in/isinstance
  • list/literal
  • dict
  • boolean