Trending technologies

#AWS #Azure #Blockchain #IOT #machine learning #Virtual Reality #Analytics #Business Intelligence

Tutorials

Blogs

List : List is a collection which is ordered and mutable. All the items in a list do not need to be of the same type and you can edit the values as per your requirement.

Declaration :


>>> a = [1, 2.2, 'python']

Example :

l = [1,2,3,4,5,6,7,8]


# l[2] = 1

print("l[2] = ", l[2])  /* Print use to print the Output*/


# l[0:3] = [1, 2, 3]

print("l[0:3] = ", l[0:3]) /* Print use to print the Output*/


# l[5:] = [5, 10, 15]

print("l[5:] = ", l[5:])  /* Print use to print the Output*/

Python Lists complete tutorial

Python Lists

List in Python

error: Content is protected !!