Guest User

Untitled

a guest
Dec 9th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. [
  2. {'type': 'doi', 'id': '10.16472/j.chinatobacco.2017.045'},
  3. {'type': 'pissn', 'id': '1004-5708'},
  4. {'type': 'eissn', 'id': '1004-5708'}
  5. ]
  6.  
  7. deissnlist = []
  8. for i in range(0,lengthD):
  9. deissnlist.append(doajresult[i]['bibjson']['identifier'][3]
  10. ['id'])
  11.  
  12. input = [
  13. {'type': 'doi', 'id': '10.16472/j.chinatobacco.2017.045'},
  14. {'type': 'pissn', 'id': '1004-5708'},
  15. {'type': 'eissn', 'id': '1004-5708'}
  16. ]
  17.  
  18. result = [x.get('id') for x in input]
  19.  
  20. print(result)
  21.  
  22. ['10.16472/j.chinatobacco.2017.045', '1004-5708', '1004-5708']
  23.  
  24. result = [x.get('id') for x in input if x.get('type') == 'eissn']
Add Comment
Please, Sign In to add comment