# Write a Python program to find all the Combinations in the list with the given condition # Python3 code to demonstrate working of # Optional Elements Combinations# Using loop  # initializing listtest_list = ["geekforgeeks", [5, 4, 3, 4], "is",              ["best", "good", "better", "average"]]  # printing original listprint("The original list is : " + str(test_list))  # initializing size of inner Optional list K = 4  res = []cnt = 0while cnt <= K - 1:    temp = []          # inner elements selections    for idx in test_list:                  # checks for type of Elements        if not isinstance(idx, list):            temp.append(idx)        else:            temp.append(idx[cnt])    cnt += 1    res.append(temp)  # printing result print("All index Combinations : " + str(res))