【发布时间】:2021-01-29 11:26:17
【问题描述】:
我有字典:
teamDictionary = {
1: {'name': 'Bob', 'team': 'A', 'status': 'Leave'},
2: {'name': 'George', 'team': 'C', 'status': 'Training'},
3: {'name': 'Sam', 'team': 'B', 'status': 'Travel'},
4: {'name': 'Phil', 'team': 'A', 'status': 'Leave'},
5: {'name': 'Georgia', 'team': 'C', 'status': 'Training'}
}
我需要获取名称数组:
['Bob','George','Sam','Phil','Georgia']
我应该如何解决我的问题?
【问题讨论】:
标签: python arrays dictionary return-value