Skip to main content

File Input/Output

  • Chapter
  • First Online:
Learn to Program with Python
  • 12k Accesses

Abstract

In every program that we have talked about so far, when the program ends, the computer forgets everything that happened in the program. Every variable you created, every string you used, every Boolean, every list—it’s all gone. But what if you want to keep some of the data that you generate in a program, and save it for when you run the program later? Or, maybe you want to save some data so that a different program could use the data that you generated.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Irv Kalb

About this chapter

Cite this chapter

Kalb, I. (2016). File Input/Output. In: Learn to Program with Python. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2172-3_9

Download citation

Publish with us

Policies and ethics