+ 1

Why is this not working??

Check this out! https://code.sololearn.com/cbi8Qr1Q5i2k/?ref=app

29th Jun 2019, 5:38 PM
Akash
Akash - avatar
6 Answers
+ 2
Akash Sil Try to add return statements as i've mentioned in my first reply and check if it does what you need. From my understanding to the purpose of the code, i think returning the function instead of just calling it is what you missing
30th Jun 2019, 3:15 PM
Mo Hani
Mo Hani - avatar
+ 2
Mo Hani i removed found a tiny mistake and after rectifying it and implementing your suggestion it is working. Thank you
30th Jun 2019, 4:57 PM
Akash
Akash - avatar
+ 1
You forgot to add a return statement after the else, elif (currently line 16,19)
29th Jun 2019, 5:49 PM
Mo Hani
Mo Hani - avatar
+ 1
Mo Hani adding return statement i am getting part of the list back
29th Jun 2019, 5:51 PM
Akash
Akash - avatar
+ 1
Akash Sil Can you tell me the purpose of the code so i can help you better
29th Jun 2019, 8:26 PM
Mo Hani
Mo Hani - avatar
+ 1
Mo Hani actually I have already written in an multi-line comment starting 2nd line
30th Jun 2019, 2:17 PM
Akash
Akash - avatar