Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Related technical and longer articles
Python List, Python Tuple, Python Dictionary
Tips and short articles on this subject
for loop - how it works (Perl, PHP, Java, C, etc)
Python collections - mutable and imutable
Python - extend v append on a list
The ternary operator in Python
Overloading of operators on standard objects in Python
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Lists and Tuples - Python module Y104
If you want to work through a whole table of values, you're likely to want to store the values in a variable that can contain more that one value at a time. Python has fundamental data types of lists, tuples and dictionaries, and this module looks at lists and tuples.

This topic is presented on public course Python Programming

Examples from our training material
cmp.py   Comparing lists
inlist.py   The in operator - is a value in a list
lcopy.py   Copying a list (or rather - copying a reference to a list)
li1.py   List - first example
li2.py   for loop to handle each element of a list
li3.py   Use of range o give list indexes
li4.py   range to go through each element of a list
lister   4 different ways of parsing a list
litu.py   Converting a list to a tuple
m2   Alternative answer to exercise 1
menu.py   A list of lists - works like a 2 D array but better ;-)
months   Answer - excercise 1 - day and month numbers
repeat.py   + and * operators on a list
revq   Parking exercise - mk 1
revq2   Parking exercise - mark 2
revq3   Parking exercise - final sample answer
sh2.py   Shuffle a list of numbers using supplied shuffle method
shuffle.py   Shuffle a list of numbers
slice.py   list slices
tu1.py   First use of a tuple
Opentalk forum discussions related to this topic
shuffling
Common Python questions
Pictures
Python Training
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
What are collections and why do we have them?
Introduction to lists.
The for loop.
Tuples.
List and Tuple Slices.
Copying a list, conerting to a list or tuple.
Concatanating and repeating lists.
Comparing lists and the in operator.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 600 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.



WELL HOUSE CONSULTANTS LTD.: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho