Home arrow Python arrow Data Structures in Python: Lists and Tuples

Data Structures in Python: Lists and Tuples

Different languages use different kinds of data structures to handle the way data is arranged in memory. This article looks at two of the more common data structures used by Python.

  1. Data Structures in Python: Lists and Tuples
  2. List
  3. Tuple
  4. Lists and Tuples in the Real World
By: A.P.Rajshekhar
Rating: starstarstarstarstar / 14
January 29, 2007

print this article



The arrangement of data within memory forms the basis of computing. The arrangement of data is known as data structure. Every language provides a variety of built-in data structures. Languages such as C provide basic data structure mechanisms, using which complex structures can be built, whereas languages such as Java use a full-blown object-oriented approach for almost all types of data structures.

Then there are languages like Python, which takes a middle approach. In this article I will be discussing the middle path used by Python, examining two of its built-in data structures: lists and tuples. The first section will focus on lists, while the second section will focus on tuples. In the final section of this article I will develop a real world application which makes use of lists and/or tuples. That's the agenda for this discussion.

More about Lists and Tuples

Lists and tuples are two of Python's basic built-in data structures. As with all other features of Python, these in-built data structures provide both flexibility and power. The answer to how flexible and powerful they are is what I am going to discuss now. First let's look at the list data structure.

>>> More Python Articles          >>> More By A.P.Rajshekhar

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Python Big Data Company Gets DARPA Funding
- Python 32 Now Available
- Final Alpha for Python 3.2 is Released
- Python 3.1: String Formatting
- Python 3.1: Strings and Quotes
- Python 3.1: Programming Basics and Strings
- Tuples and Other Python Object Types
- The Dictionary Python Object Type
- String and List Python Object Types
- Introducing Python Object Types
- Mobile Programming using PyS60: Advanced UI ...
- Nested Functions in Python
- Python Parameters, Functions and Arguments
- Python Statements and Functions
- Statements and Iterators in Python

Developer Shed Affiliates


Dev Shed Tutorial Topics: