18.车牌区域划分, 现给出以下车牌.根据车牌的信息, 分析出各省的车牌持有量.(升级题) result = {} for car in cars: location = locals[car[0]] result[location] = result.get(location,0)+1 print(result) result = {} for car in cars: # car 车牌子 first_name = car[0] # 山东 location = locals[first_nam…
检查获取传入列表或元组对象的所有奇数位索引对应的元素,并将其作为新列表返回给调用者. li = [11,22,33,44,55,66,77,88,99,000,111,222] def func1(lst): new_li = [] for i in range(0,len(lst),2): new_li.append(lst[i]) return new_li print(func1(li))…