The data type list is an ordered sequence which is mutable and made up of one or more elements.

  • A list can have elements of different data types , such as integer, float, string, tuple or even another list. 
  • A list is very useful to group together elements of mixed data types. 
  • Elements of a list are enclosed in square brackets and are separated by comma. 
  • Like string indices, list indices also start from 0.

Accessing elements in a List

The elements of a list are accessed in the same way as characters are accessed in a string. 

The list items are accessed by referring to the index number in square brackets. 

 

Introduction to Lists in Python - Computer Science Class 11 Notes - Concepts

part 2 - Introduction to List - Concepts - Chapter 9 Class 11 - Lists - Computer Science - Class 11

 

Lists are Mutable

In python, lists are mutable ie.,  the contents of the list can be changed after it has been created.

part 3 - Introduction to List - Concepts - Chapter 9 Class 11 - Lists - Computer Science - Class 11

Remove Ads Share on WhatsApp
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.