find the size of list in Python
find the size of list in Python
we can find the size of list with the help of len( ) function in Python. but before doing it we should familiar with len ( ) function so first of all we should know Syntax of len() function.
Syntax of len ( ):- len(object)
Now , we are taking a one example to understand clearly.
Example :-
- x= [1,2,3,4,5,6]
- print(len(x))
in the above example, the length of list will be printed on screen.
Comments
Post a Comment