Feature
- Ordered sequence of data
- Mutable
- Iterable
- Indexing and slice works
create a list
dinner = ['steak', 'apple', 'soup']
print(list('steak')) #['s', 't', 'e', 'a', 'k']
breakfast = ('sandwich', 'milk')
print(list(breakfast)) #['sandwich', 'milk']
list() #[]
date = '2022/06/13'
print(date.split('/'))#['2022', '06', '13']
Functions
- len() - returns the number of elements
- min()
- max()
-
- count() - method can count the occurrences
- index() - method returns the first index of the object.
- list concatenation by +