liveBook · Manning

Write operation

A write operation transfers data to a destination or changes stored data or other state.

How 2 Manning books explain it

The Quick Python Book, Fourth Edition

write is a file-object method that writes text or bytes to an open file and returns the number of units written.

How it is used
Writes text to open file objects and standard output or error streams.
How deep it goes
Explains arguments, embedded newlines, line-ending translation, binary mode, and the writelines alternative.
Examples
Uses a multiline string and standard-output redirection to demonstrate visible file and character-count results.
What you can do after
Apply it via Python file objects to produce controlled text output with explicit newline and line-ending behavior.

Read how The Quick Python Book, Fourth Edition explains write operation →

Grokking Simplicity

A write operation modifies the stored value or state of data.

How it is used
Classifies data-changing operations and guides their conversion into immutable updates.
How deep it goes
Defines writes, gives a three-step copy-on-write procedure, and separates combined reads from writes.
Examples
Uses shopping-cart updates, item pricing, array insertion, and array removal to illustrate writes.
What you can do after
Build it from scratch using copy-on-write and split combined reads from writes for independent reuse.

Read how Grokking Simplicity explains write operation →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.