Python
  Home arrow Python arrow Data Structures in Python: Lists and Tuples
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PYTHON

Data Structures in Python: Lists and Tuples
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 10
    2007-01-29


    Table of Contents:
  • Data Structures in Python: Lists and Tuples
  • List
  • Tuple
  • Lists and Tuples in the Real World

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Data Structures in Python: Lists and Tuples
    ( Page 1 of 4 )

    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.

    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
     

       

    PYTHON ARTICLES

    - 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
    - Sequences and Sets in Python
    - Python Expressions and Operators
    - Dictionaries, Variables and Statements in Py...
    - Data Types in Python
    - The Python Language
    - SSH with Twisted





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT