在python中从数组中提取信息

时间:2018-05-17 04:32:37

标签: python

fields = [
                        ('Booktitle', 'name'), 
                        ('Date-Added', '2017-06-30 03:44:04 +0000'), 
                        ('Date-Modified', '2017-06-30 03:51:00 +0000'), 
                        ('Doi', '10.1007/978-3-642-21563-6_5'), 
                        ('Pages', '81--99'), 
                        ('Publisher', 'Springer'),
                        ('Series', 'anyseries'), 
                        ('Title', 'dummy title'), 
                        ('Volume', '6600'),
                        ('Year', '2011'), 
                        ('Bdsk-Url-1', 'http://dx.doi.org/10.1007/978-3-642-21563-6_5')
                    ], 

这是我的循环:

for entry in bib_data.entries:
    # checking how many entries do we have, for now we have 2 entries.
    print(entry)
    print(bib_data.entries[entry].fields)   
    for fields in bib_data.entries[entry].fields:
        print(fields)

我正在寻找的结果是

('Booktitle','name')

但我得到的结果只是“Booktitle”。

0 个答案:

没有答案
相关问题