def count_occurrences(tpl, element):
# complete function here...
print(count_occurrences((1, 2, 3, 2, 2, 4), 2))
# expected output: 3
print(count_occurrences((3, 3, 3, 3, 3, 4), 3))
# expected output: 5
print(count_occurrences(('a', 'b', 'c', 'd', 'c', 'b'), 'b'))
# expected output: 2
Python
Setting up Python environment...
Output