擅长:python、mysql、java
<p>我找到了解决办法,我相信还有更好的办法,但我做了些什么。首先,我建立了一个列表和dict列表。然后我构建了一个dict并以这种方式加载dict。在</p>
<pre><code># List of lists and dicts
serverintlist = [project_info, aliases_info, channels_info]
serverintdict = {}
serverintdict['project'] = serverintlist[0]
serverintdict['alias'] = serverintlist[1]
serverintdict['channel'] = serverintlist[2]
print(type(project_info)) # <class 'dict'>
print(type(aliases_info)) # <class 'list'>
print(type(channels_info)) # <class 'list'>
print(type(serverintdict)) # <class 'dict'>
</code></pre>