From 30ac1cecf066f430e7894accad066f313421ce5f Mon Sep 17 00:00:00 2001 From: vivekshingate Date: Sat, 29 Sep 2018 05:10:24 +0000 Subject: [PATCH] Done --- __pycache__/__init__.cpython-36.pyc | Bin 0 -> 167 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 183 -> 189 bytes .../__pycache__/build.cpython-36.pyc | Bin 949 -> 574 bytes q01_longest_even_word/build.py | 19 +++++++++++++++--- .../tests/__pycache__/__init__.cpython-36.pyc | Bin 189 -> 195 bytes .../tests/__pycache__/test.cpython-36.pyc | Bin 1915 -> 1921 bytes 6 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 __pycache__/__init__.cpython-36.pyc diff --git a/__pycache__/__init__.cpython-36.pyc b/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51f171b7b812376bfebdcc2b27a86947edb99cdd GIT binary patch literal 167 zcmXr!<>gY~Tp!KIz`*brh~WSv-~hzMEI=ZKA(%mv(QhR~5l9$8{0h;}$j?pHFUu@T z%`VQ!%u7!!N!1U}FUl@1NK8)EPtH$C)lVx*OfE^xiO)z(&Q2{VO3cfS&&VtSs*O+1 pNX*Ge%}Y;>H`I@h&&{qX#v?BasN- delta 49 zcmdnXxSf&1n3tF9%;9HI6FJOfQ}i?Pb5r#blQJ^(UGmHGa`F>XiuGMmi?d7e3nnH- F0|2F95yAif diff --git a/q01_longest_even_word/__pycache__/build.cpython-36.pyc b/q01_longest_even_word/__pycache__/build.cpython-36.pyc index 7926364e1294456cec2db64f01401301047eda48..2b7a629b01b5e640342aad72dcad859f6832a4e2 100644 GIT binary patch literal 574 zcmZvYzfRmh5XNWLJ}`)DB7#y{sp1r8PH9gkBq%~da}r2Ik+s>~oQ>D^-R^Sy(NP^O z1&@)6_i;otO?Uj;khD*-U&$m&b_+{5gB2XW3U6?U=CdPrOa^ys0x~24QF=%JVJ03E zlT8Wn^V1DFSmFvL>=3wQCS2k@n-d^mPrmgN2@-4rt?GoeY_Qwnbp1R{^QKbi zqFAWX=0!c_PNgS}Dea64m5N5H^ta){ah>H{l*$-hmswsIdYg%yYobn7HcaQc!%R06 zTbHSYs|B-W@F#j`pMSdI(fHjFw%|S+KwrBt@0a`>dN@S zBxrkfrVG~w6~8orzhbA6Rkc&KP%ZLqyT7(h+4keReR`C#5gFhI3~`H@KE>BN-;4M# k=2d*`za^gh`k*_ zjywkM!V~z4gw$8)iCMd)Al25+u4i^<{`0f_uG47`fBueNQ-ELa&xOzM0f+9PVZexh z*v?dt1&t{I<}mjw#111T5PCPb3qFRV>a3(&MHz8xGF;3mOA6!pN3v zNJ(at(Gs?F1I8&~=5Aq2zL6_3CUud(c*eiRy<0N05x4@3cv!xPps$H+sPRj>CCr~w zHD>+^lyufIf%Rb}=Nd|<3(W5VN^Y$WRw_5VcPW>ur=?h$To%14S9~3uuHKw7G`FPp zw*^bY$MGD8evf7XC473jAqFrp>7on<`$!6lyN%}|GN#|@xr=4#jm@Jh7o_C~UWBxw z{lkjn`0QDF`Ul*m(Nr#Yl#Zr(G?c4C$du`5$o1UFvuLc+%%mcjrrDe;l@{}4nyb8+ zB-u0-m~+CDL3DmNNQA_-HVOaCi^L|6M$25V{@LYi`$**4WO8wK+_o(>{jI}CkM)m) z%u=C`adCg@KQi_O*JKWGQImPPAq@ovUAXI>+}Os|4w{fEOH;M%npCb;SO=6igl-&YUKn0v9QW`E zzli<%I~~NY#<@a16U9?wK^4ozh^wSNe6O>E`BY$yl~%oYl#nf|pP>QTCcAjQ#Cw;x vbdRWg^oFk5!zu0*!p!^kKS(XVjyJtqG7l80;AkP)Qt)GoO(N^lj7sk diff --git a/q01_longest_even_word/build.py b/q01_longest_even_word/build.py index 0685739..ed8b43e 100644 --- a/q01_longest_even_word/build.py +++ b/q01_longest_even_word/build.py @@ -1,9 +1,22 @@ +# %load q01_longest_even_word/build.py # Default imports -import re - - # Write your solution here : def q01_longest_even_word(sentence): + a=[x for x in sentence.split() if len(x)%2==0] + if a: + return max(a,key=len) + else: + return 0 + +#For sentence having even string +q01_longest_even_word('Hi I am Vivek Shingate') + +#For sentence having odd strings +#q01_longest_even_word('Hello I ain\'t Vivek Shingates') + + + + 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 7782007a6d513192b9ba7509abb59f87e256a09f..e4340180eaef3063b0c3207245493163b9923c09 100644 GIT binary patch delta 55 zcmdnXc$ksHn3tDJi*tSSL=JQ10{x8q+*JLt%(B$%;*89^^u&@>{qX#v?BasNXiuGMmi?d7e3nnHd F0syK;5#|5@ 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 a62a5d8dc0a25e6368ba602812bc8d872975e0fa..605ed96861bbc231e6c916c0981f09b0e5d08fd7 100644 GIT binary patch delta 58 zcmey(*T~Od%*)HA#koFuBL_3Ha*lpRer~FMS!P*kc5y~#UV36ls(yHWQFd`bVsff} Na(+tcW)0?G761)665s#; delta 52 zcmZqV|INo?%*)G_b?sTyMh<3X*);u({M=Oi#H5T&eV6?5yqx^Rlwy6C)Z*-t{DRGT H%)u-G#OM)p