程序代码:
d2e={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six"} print(d2e) print(d2e[5]) e2d={} for key,val in d2e.items(): e2d[val]=key print(e2d) s=list(e2d.keys()) print(s) s=''.join(s) print(list(s)) m=set(tuple(list(s))) print(m)
d2e={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six"} print(d2e) print(d2e[5]) e2d={} for key,val in d2e.items(): e2d[val]=key print(e2d) s=list(e2d.keys()) print(s) s=''.join(s) print(list(s)) m=set(tuple(list(s))) print(m)