1.列表推导式multiples = [i for i in range(30) if i % 2 is 0]names = [[],[]]multiples = [name for lst in names for name in lst if name.count('e') >= 2] 2.字典推导式mcase = {'a': 10, 'b': 34}mcase_frequency = {mcase[k]: k for k in mcase} 3.集合推导式squared = {x**2 f…