LoginSignup
2
2

More than 5 years have passed since last update.

めざせpythonライブラリマスター (61)nested-lookup

Posted at

【ライブラリ説明】

 ネストされたリストや辞書の値を簡単に取得できる

【プログラム】

from nested_lookup import nested_lookup

document = [ { 'taco' : 42 } , { 'salsa' : [ { 'burrito' : { 'taco' : 69 } } ] } ]

print(nested_lookup('taco', document))
# [42, 69]

【参考サイト】

 pypi
 github

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2