尽管转换为列表,但我得到的是压缩的对象
import itertools as it
def combi(i,j):
string_maps = {"1": "abc","2": "def","3": "ghi","4": "jkl","5": "mno","6": "pqrs","7": "tuv","8": "wxy","9": "z"}
string_maps=dict((int(k),v) for k,v in string_maps.items())
list1=[]
list1.append(string_maps.get(i))
list2=[]
list2.append(string_maps.get(j))
list_new =list([zip(x,list2) for x in it.permutations(list1,len(list2))])
print(list_new)
combi(4,3)