Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added __pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified q01_longest_even_word/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified q01_longest_even_word/__pycache__/build.cpython-36.pyc
Binary file not shown.
11 changes: 9 additions & 2 deletions q01_longest_even_word/build.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# %load q01_longest_even_word/build.py
# Default imports

import re


# 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')


Binary file modified q01_longest_even_word/tests/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified q01_longest_even_word/tests/__pycache__/test.cpython-36.pyc
Binary file not shown.