count replaced items in list python code example
Example 1: how to find the number of times a number appears in python
dict((i, a.count(i)) for i in a)
Example 2: change element in list python
list = ['unchanged', 'unchanged']
list[0] = 'changed'
print(list)
## ['changed', 'unchanged']