diff --git a/__pycache__/__init__.cpython-36.pyc b/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..a80d348 Binary files /dev/null and b/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc b/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc index 8ad4b68..8b0abf8 100644 Binary files a/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc and b/q01_longest_even_word/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_longest_even_word/__pycache__/build.cpython-36.pyc b/q01_longest_even_word/__pycache__/build.cpython-36.pyc index 7926364..f661b0a 100644 Binary files a/q01_longest_even_word/__pycache__/build.cpython-36.pyc and b/q01_longest_even_word/__pycache__/build.cpython-36.pyc differ diff --git a/q01_longest_even_word/build.py b/q01_longest_even_word/build.py index 0685739..21c5bb3 100644 --- a/q01_longest_even_word/build.py +++ b/q01_longest_even_word/build.py @@ -1,3 +1,4 @@ +# %load q01_longest_even_word/build.py # Default imports import re @@ -5,5 +6,11 @@ # Write your solution here : def q01_longest_even_word(sentence): - - + #sentence='My1 named ist Prteeti' + even_list = [x for x in sentence.split() if len(x) % 2 == 0] + output = max(even_list, key=len) if even_list else 0 + return output + +q01_longest_even_word('My1 namd isd Prseeti') + + diff --git a/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc b/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc index 7782007..ed6595a 100644 Binary files a/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc and b/q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc b/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc index a62a5d8..006eb1f 100644 Binary files a/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc and b/q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc differ