# Write a Python program to Extract tuples having K digit elements # Python3 code to demonstrate working of# Extract K digit Elements Tuples# Using all() + list comprehension  # initializing listtest_list = [(54, 2), (34, 55), (222, 23), (12, 45), (78, )]  # printing original listprint("The original list is : " + str(test_list))  # initializing KK = 2  # using len() and str() to check length and # perform string conversionres = [sub for sub in test_list if all(len(str(ele)) == K for ele in sub)]  # printing resultprint("The Extracted tuples : " + str(res))