# Write a Python program to Extract Key’s Value, if Key Present in List and Dictionary # Python3 code to demonstrate working of # Extract Key's Value, if Key Present in List and Dictionary# Using all() + list comprehension  # initializing listtest_list = ["Gfg", "is", "Good", "for", "Geeks"]  # initializing Dictionarytest_dict = {"Gfg" : 2, "is" : 4, "Best" : 6}  # initializing K K = "Gfg"  # printing original list and Dictionaryprint("The original list : " + str(test_list))print("The original Dictionary : " + str(test_dict))  # using all() to check for occurrence in list and dict# encapsulating list and dictionary keys in list res = None if all(K in sub for sub in [test_dict, test_list]):    res = test_dict[K]  # printing result print("Extracted Value : " + str(res))