fork(1) download
  1. dict1 = {
  2. "item": {
  3. "443b52fc-4eba-4165-9b01-92281e877896": {
  4. "templateId": "ConditionalAction:generic_instance"
  5. }
  6. }
  7. }
  8.  
  9. dict2 = {
  10. "items": {
  11. "443b52fc-4eba-4165-9b01-92281e877896": {
  12. "templateId": "ConditionalAction:generic_instance"
  13. },
  14. "6c882c1e-bccd-4c21-83ad-aef87f6c6d12": {
  15. "templateId": "AthenaRewardGraph:s19_winterfest"
  16. },
  17. }
  18. }
  19.  
  20.  
  21. print(next(iter(dict1['item'])))
  22.  
  23. list2 = list(dict2['items'])
  24. print(*list2, sep='\n')
  25.  
  26. # or
  27. items_keys = dict2['items'].keys()
  28. print(items_keys)
Success #stdin #stdout 0.02s 9112KB
stdin
Standard input is empty
stdout
443b52fc-4eba-4165-9b01-92281e877896
443b52fc-4eba-4165-9b01-92281e877896
6c882c1e-bccd-4c21-83ad-aef87f6c6d12
dict_keys(['443b52fc-4eba-4165-9b01-92281e877896', '6c882c1e-bccd-4c21-83ad-aef87f6c6d12'])