1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ki77a [65]
4 years ago
6

A) How could you modify Shelve with a technique discussed in class so that you can create Shelve instances that contain // Tools

, Dishes or any other kind of object? // B) Create a function that takes in two shelves
Computers and Technology
1 answer:
Kay [80]4 years ago
3 0

Answer:

See explanation

Explanation:

A “shelf” is a dictionary-like object. A shelf is an arbitrary Python objects, that is; anything that the pickle module can handle. This includes recursive data types and objects containing lots of shared sub-objects. It must be noted that the keys are ordinary strings.

(A). modification to Shelve can be done by following this instructions;

(1). Do not redefine built-in functions,(2). grab shelved item, mutate item, write mutated item back to shelf.

The number (2) instructions is during iteration over shelved items.

(B). CREATING FUNCTIONS THAT TAKES IN TWO SHELVES;

import shelve

d = shelve.open(filename) # open -- file may get suffix added by low-level

# library

d[key] = data # store data at key (overwrites old data if

# using an existing key)

data = d[key] # retrieve a COPY of data at key (raise KeyError if no

# such key)

del d[key] # delete data stored at key (raises KeyError

# if no such key)

flag = key in d # true if the key exists

klist = list(d.keys()) # a list of all existing keys (slow!)

# or, d=shelve.open(filename,writeback=True) would let you just code

# d['xx'].append(5) and have it work as expected, BUT it would also

# consume more memory and make the d.close() operation slower.

d.close() # close it

You might be interested in
Which of the following is involved in creating technical communication?
Eva8 [605]

Answer:

(D) All of these answers are correct.

Explanation:

Technical communication is the transmission of any specialized information, be it scientific reports, medical procedures, and any other professional information. Technical information are passed for a specific a purpose are factual, precise, concise and clear. An electrical engineer filling out a standardized form, a webmaster revising a company web page, a company secretary writing a letter to a customer and a manager preparing an oral presentation are all conveying technical information.

8 0
3 years ago
Which is a correct explanation of first lines?
tatyana61 [14]

The correct explanation of the first line in poems is; Choice B; The first lines determine all of the poet's subsequent choices.

<h3>Meaning of poem</h3>

By literature definition, a poem is a piece of writing in which the words are chosen for their beauty and sound and are carefully arranged, often in short lines which rhyme.

To ensure that these short lines in poems rhyme, the first line serves as a template and consequently, determines all of the poet's subsequent choices.

Read more on poems and first line;

brainly.com/question/4343450

8 0
3 years ago
This is a python program.
denpristay [2]

Answer:

word = input("Type your name: ")

print(len(word))

Explanation:

The len function will count all the chars in the string.

7 0
4 years ago
11111110110001001100010110111010 How many characters are encoded in<br> that binary data? *
omeli [17]

Answer:

33.

Explanation:

8 0
3 years ago
Read 2 more answers
A software engineer with a detail oriented personality has the patience and aptitude for
AnnZ [28]

Answer is: looking through many lines of code for errors that cause bugs



Explanation:

A software engineer with a detail oriented personality has the patience and aptitude for  looking through many lines of code for errors that cause bugs


Because software writes many lines of code for developing different application so he has to go through through many lines of code for errors that causes a bug or errors.

I hope you got the idea and answer thanks.

5 0
3 years ago
Other questions:
  • Which of the following are true statements about the data that can be represented using binary sequences?
    5·1 answer
  • What are three methods of sustainable farming and describe each.
    9·1 answer
  • What are operational databases
    12·1 answer
  • Write a SELECT statement that returns these column names and data from the Order_Items table:
    14·1 answer
  • Which feature enables you to make changes to all the slides of your presentation at the same time?
    15·2 answers
  • Which of the following best describes a situation where software should be upgraded instead of replaced?
    6·1 answer
  • They are correct? thank you!
    5·1 answer
  • How can you make a search phrase more effective?
    11·1 answer
  • Can you help me with Computer issues graphic organizer?<br> Will give out brainly
    6·1 answer
  • What type of os must be installed on your machine to allow this type of action by another person?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!