私の期待する結果をどうやって思いつくのか分かりますか?私は "if"ステートメントを使ってこれを1時間苦労しているが、何も起こらなかった。Python:複数の辞書リストから空文字列をフィルタリングする
books = [{'title':'Angels and Demons'},{'title':''},{'title':'If'},{'title':'Eden'}]
authors = [{'author':'Dan Brown'},{'author':'Veronica Roth'},{'author':''},{'author':'James Rollins'}]
for i, book in enumerate(books):
print(book, authors[i])
expected result:
({'title': 'Angels and Demons'}, {'author': 'Dan Brown'})
({'title': 'Eden'}, {'author': 'James Rollins'})
を。あなたが正しく説明しなければ、どうすればあなたを助けることができますか?詳細についてはhttps://stackoverflow.com/help/how-to-askをお読みください – Mikkel