习题: 将以下字典扁平化,输出为 target 字典格式source = {'a': {'b': 1, 'c': 2}, 'd': {'e': 3, 'f': {'g': 4}}}target = {'a.b': 1, 'd.f.g': 4, 'd.e': 3, 'a.c': 2} source = {'a': {'b': 1, 'c': 2}, 'd': {'e': 3, 'f': {'g': 4}}} target = {} def flatmap(srcDic, targetKey='')