``````

In [1]:

l = ['a', 'a', 'a', 'a', 'b', 'c', 'c']

print(len(l))

``````
``````

7

``````
``````

In [2]:

l = ['a', 'a', 'a', 'a', 'b', 'c', 'c']

``````
``````

In [3]:

print(l.count('a'))

``````
``````

4

``````
``````

In [4]:

print(l.count('b'))

``````
``````

1

``````
``````

In [5]:

print(l.count('c'))

``````
``````

2

``````
``````

In [6]:

print(l.count('d'))

``````
``````

0

``````
``````

In [7]:

l = list(range(-5, 6))

print(l)

``````
``````

[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]

``````
``````

In [8]:

print([i for i in l if i < 0])

``````
``````

[-5, -4, -3, -2, -1]

``````
``````

In [9]:

print(len([i for i in l if i < 0]))

``````
``````

5

``````
``````

In [10]:

print([i for i in l if i % 2 == 1])

``````
``````

[-5, -3, -1, 1, 3, 5]

``````
``````

In [11]:

print(len([i for i in l if i % 2 == 1]))

``````
``````

6

``````
``````

In [12]:

l = ['apple', 'orange', 'banana']

``````
``````

In [13]:

print([s for s in l if s.endswith('e')])

``````
``````

['apple', 'orange']

``````
``````

In [14]:

print(len([s for s in l if s.endswith('e')]))

``````
``````

2

``````