这是我所拥有的:
item_dictionary = {'10350': 'Third-Age Full', '560':'Death Rune'}
filler = []
for i in range(0,365):
filler.append(None)
filler1=[]
for i in range(0, 2):
filler1.append(None)
filler2=[]
for i in range(0, 1):
filler2.append(None)
names = item_dictionary.values()
names_filled = list(itertools.chain.from_iterable(zip(names, filler1 * len(names))))
#Returns ['Death Rune', None, 'Third-Age Full', None]
和
names = item_dictionary.values()
names1 = list(itertools.chain.from_iterable(zip(names, filler2 * len(names))))
names_filled = list(itertools.chain.from_iterable(zip(names1, filler1 * len(names))))
#Returns ['Death Rune', None, None, None, 'Third-Age Full', None, None, None]
我正在努力,['Death Rune', None, None, 'Third-Age Full', None, None]
但我似乎做不到,有人可以帮我吗?谢谢。