Data Types

Learning Objectives

By the end of this chapter, you will be able to:

  • Explain the different numerical data types
  • Use operators on numerical data types
  • Explain strings and implement string operations, such as indexing, slicing, and string formatting
  • Describe escape sequences
  • Explain lists and perform simple operations on them
  • Use Boolean expressions and Boolean operators

This lesson introduces the data types available to us. We look at integers, strings, lists, and Booleans.


In the previous chapter, we learned about variables and looked at a few of the values/types of data that can be assigned to them. Specifically, we dealt with data of the string and integer types. In this chapter, we will look at the other ...

Get Python Fundamentals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.