Home > Python > Lists in Python

Lists in Python

This post was most recently updated on July 31st, 2024

List is the most commonly used collection in Python. It is used to store list of variables which may have different data types. It is also useful to implement stacks and queues data structures. Variables can be dynamically stored using Lists.

Following are some features of list
1. Lists are written with square brackets.
2. Functions, modules used in the script can also be stored in List
3. Duplicate records are allowed in list.
4. Created list can be updated as and when required.

Following operations can be performed on List:

Output:

Image: Output
This Article is TAGGED in , . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">