python - Searching for a word in a nested list -
I am trying to write a function that specifically searches in the list:
DEF Search (Inlist, Matches): In Li In Inlist: For M In Match: If M: Lee: Returns Le Returns Any El [[("Daniel", "20 November", "Tenochtitle") , ("Anturo" 17, "17 October")] Here, for example, looking for Daniel's date of birth.
I have to define this search but I am not sure how to go from here.
I got this code from: <("Daniel", "20 ("Daniel", "November 20") for Data in D data (L, ['Daniel']) # for data ("Daniel", "Tenochtitlen"), ("Arthur", 17, "17 October")] data = search (L, ['Daniel']) "Tenochtitle") will be: #regexp To find something specific, return that value if something goes wrong.match (d): return D
but you need to be more specific if you have a Want more specific answers.
Comments
Post a Comment