Python Lists
  • Lists are ordered collection of data items.
  • They store multiple elements in a single variable.
  • List items are separated by commas and enclosed within square brackets [].
  • it is a collection of elements of different type. list follow indexing and slicing and looping.
  • list is a mutable data type – change after creation

Example 1:

L=[3,4,5,6,7,1,2,"hello",4.5,3.44,90]
print(L)
print(type(L))
print(len(L)) 
Output:
[3, 4, 5, 6, 7, 1, 2, 'hello', 4.5, 3.44, 90]
<class 'list'>
11