2022-11-28 ■ python # 問題 handle_collision def handle_collision(dic1, str1): index = len(str1) if index not in dic1: ls = [str1] dic1[index] = ls else: dic1[index].append(str1) return dic1 dic1 = {1: ['apple']} str1 = 'a' handle_collision(dic1, str1)