请问下面这段python代码中,第六行的[val]为什么要加方括号?def invert_dict(d): inverse = dict() for key in d: val = d[key] if val not in inverse: inverse[val] =[key] else: inverse[val].append(key) return inverse