Skip to main content
  • 14k Accesses

Abstract

In the previous chapter, you learned that a variable is a unit of data with an identifier, which is held in your computer’s memory; it can be changed by putting a new value into it or modifying the value that is already there. In this chapter, I will be introducing some of the different types of variable that are available for you to use in your programs, and I’ll be showing you how to build them into the expressions and statements of Python that will allow you to turn your designs into working code. This is where you start to do some real programming. You will be creating two programs from scratch in this chapter: one to manipulate and format simple text strings and a script that performs a mathematical calculation. All this is made possible by using variables.

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 59.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Tim Hall and J-P Stacey

About this chapter

Cite this chapter

(2009). Variables and Data Types. In: Python 3 for Absolute Beginners. Apress. https://doi.org/10.1007/978-1-4302-1633-9_3

Download citation

Publish with us

Policies and ethics