From af37a81d1fdb35e33bdeeca8e859c8e2eb65963b Mon Sep 17 00:00:00 2001 From: Joe Stanley Date: Thu, 13 Oct 2022 18:02:06 -0700 Subject: [PATCH] created lambda filter function --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e16db0f..f76b230 100644 --- a/main.py +++ b/main.py @@ -102,8 +102,9 @@ def main(): # then update window['-TABLE-'].update(values=new_data) else: print(event, values[event]) + filter_database = lambda s: s.find(values[event]) != -1 Computers=Query() - print(db.search(Computers[event[7:]].find(values[event])!=-1)) + print(db.search(Computers[event[7:]])) # Finish up by removing from the screen