“Introduction of List in Python”
Hey Friends Sandesh is here again,today we will discuss what is list in python.We will see below simple points to know about a list,so lets start.
1]List is the collection of a data.
2]The data stored in square brackets seperatet by the comma is list.
3]Data stored in list is ordered or in sequence.
4]List is mutable.
-Change,Delete,Modified in order
5]list can contain any type of value.
6]It can contain mix values too.
7]List is one of the collection data types.
8]List can repeat same value multiple times.
9]Can do indexing and slicing in a list.
10]Can create list in a list is called as nested list.
1]List is the collection of a data.
We can keep or stored things in the form of value.
2]The data stored in square brackets seperatet by the comma is list.
List is always in square brackets and the values in it always separated by the comma.The item we adding in the list should closed with [ ] and seperaed by “ , ”.
3]Data stored in list is ordered or in sequence.
Whatever is the data stored in the list is stored in ordered or in sequence.
4]List is mutable.
-Change,Delete,Modified in order
Can replce the value,can delete the value, can add the value, but cannot re-arrange the value.
5]list can contain any type of value.
List can hold any type of the value str,int,float,bool
6]List can contain mix values too.
Storing items of different datatypes in one list is possible.
7]List is one of the type of collection data types.
There are 4 collection data types
-List
-set
-tuple
-dictionary
And list is the one of them and we can define what is the class of it by using type built in function.
8]List can repeat same value multiple times.
Can add same value in list for multiple time,it gives user previlage to make list with whatever data he has.
9]Can do indexing and slicing in a list.
Indexing to get sinle element from the list is possible
Slicing to get multiple elements from the list is possible.
10]Can create list in a list is called as nested list.
Can make list inside the original list using sqaure brackets, is called nested list.
In this article we seen what is the list and its arrtributes.In next article we will see complete creation of the list and its complex modification.I hope you will find this article helpful.
Thanks!
#vevcodelab
@sandeshgaikwad