Python - Count the elements in a list until an element is a Tuple
The problem involves a list of elements, we need to count how many elements appear before the first occurrence of a tuple. If no tuple is found in the list, return the total number of elements in the list. To solve this, initialize a counter and use a while loop to iterate through the list, checking