1. Technology

Beginning Python: Data Types

By

1 of 10

Introduction

As I said in the tutorial "How a Computer Looks At Your Program", computer programs consist of data and code. In order to make code able to be used for more than a single set of data, computer programs use variables, or containers for data. These containers are technically called data structures because they allow the data to be structured in different ways. Just like you would probably be disinclined from cooking pasta in a coffee cup or drinking tea from a vat, so Python offers a variety of containers for different kinds of data.

In Python, there are five basic data structures or types of variables: integers, strings, lists, tuples, and dictionaries. In the following pages, we will look at each in turn.

Other tutorials in this series: 1 | 2 | 3 | 4 | 5 | 6

  1. About.com
  2. Technology
  3. Python

©2014 About.com. All rights reserved.