0% found this document useful (0 votes)
18 views1 page

Understanding Python List Collections

The document discusses four collection data types in Python: lists, tuples, sets, and dictionaries. Lists are ordered and changeable, tuples are ordered and unchangeable, sets are unordered and unchangeable but you can add or remove items, and dictionaries are ordered and changeable.

Uploaded by

Ram Vishal Patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Understanding Python List Collections

The document discusses four collection data types in Python: lists, tuples, sets, and dictionaries. Lists are ordered and changeable, tuples are ordered and unchangeable, sets are unordered and unchangeable but you can add or remove items, and dictionaries are ordered and changeable.

Uploaded by

Ram Vishal Patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3/7/24, 8:31 AM Python Lists

Python
 Collections
Tutorials  Exercises  (Arrays)
Services   My W3Schools

HTML CSSfour JAVASCRIPT


There are SQL in PYTHON
collection data types the Python JAVA PHP language:
programming HOW TO [Link] C

List is a collection which is ordered and changeable. Allows duplicate members.


Tuple is a collection which is ordered and unchangeable. Allows duplicate
members.
Set is a collection which is unordered, unchangeable*, and unindexed. No
duplicate members.
Dictionary is a collection which is ordered** and changeable. No duplicate
members.

*Set items are unchangeable, but you can remove and/or add items whenever you
like.

**As of Python version 3.7, dictionaries are ordered. In Python 3.6 and earlier,
dictionaries are unordered.

When choosing a collection type, it is useful to understand the properties of that type.
Choosing the right type for a particular data set could mean retention of meaning,
and, it could mean an increase in efficiency or security.

❮ Previous Next ❯

[Link] 5/8

You might also like