Program - Count Tuple Elements Inside List


Topic: Program - Count Tuple Elements Inside List

Solution

random = ['a', ('a', 'b'), ('a', 'b'), [3, 4]]
count = random.count(('a', 'b'))
print("The count of ('a', 'b') is:", count)



List all Python Programs