The program defines a tuple t with 11 integer elements. The print() function is used to output the entire tuple. Next, the count() method is used to count the number of occurrences of the value 2 in the tuple. The result of the count() method is assigned to the variable count and printed to the console using the print() function. As a result, the output will show the number of times the value 2 appears in the tuple t. In this case, the output will be "3", indicating that the value 2 appears 3 times in the tuple t.
t = (2,34,45,6,7,2,4,5,78,34,2) print(t) count = t.count(2) print(count)
(2, 34, 45, 6, 7, 2, 4, 5, 78, 34, 2) 3
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions