GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Which expression correctly checks if the key “port” exists i…

Which expression correctly checks if the key “port” exists in the dictionary settings?

Read Details

Start with d = {}. Then execute d[‘a’] = 1, d[‘b’] = 2, d[‘c…

Start with d = {}. Then execute d[‘a’] = 1, d[‘b’] = 2, d[‘c’] = 3, d.pop(‘b’). What is len(d)?

Read Details

Given keys = [‘a’, ‘b’, ‘c’] and values = [1, 2, 3], what do…

Given keys = [‘a’, ‘b’, ‘c’] and values = [1, 2, 3], what does {k: v for k, v in zip(keys, values)} produce?

Read Details

If data = {“item”: “Book”, “qty”: 5} and you execute data[“i…

If data = {“item”: “Book”, “qty”: 5} and you execute data[“item”] = “Magazine”, what best describes what happened?

Read Details

Although not explicitly detailed in the notes beyond basic u…

Although not explicitly detailed in the notes beyond basic unpacking, Python supports extended unpacking. If data = (1, 2, 3, 4, 5), what values are assigned in first, *middle, last = data?

Read Details

Given names = [“alice”, “bob”, “charlie”], what does [name.u…

Given names = [“alice”, “bob”, “charlie”], what does [name.upper() for name in names] produce?

Read Details

Which statement accurately describes the requirements for ke…

Which statement accurately describes the requirements for keys in a Python dictionary?

Read Details

Given fruits = [‘apple’, ‘banana’, ‘cherry’], what does {i:…

Given fruits = [‘apple’, ‘banana’, ‘cherry’], what does {i: fruit for i, fruit in enumerate(fruits)} produce?

Read Details

What is the primary characteristic of a Python dictionary?

What is the primary characteristic of a Python dictionary?

Read Details

What is the name of the module that allows you to copy, dele…

What is the name of the module that allows you to copy, delete and/or rename files?

Read Details

Posts pagination

Newer posts 1 … 27,191 27,192 27,193 27,194 27,195 … 85,127 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top