无法从列表中获取字典值

我有一个这样的列表,我需要获取字典中两个键的字典的值(dict)

dict = [{'module': 'https://svn.domain.com/svn/reponame/branchname', 'revision': 22295}]

预期产量:

https://svn.domain.com/svn/reponame/branchname

22295

评论
“疯女人”
“疯女人”

Your dict is actually a dictionary within a list. Try:

print(dict[0]['module'])
print(dict[0]['revision'])
点赞
评论