0

I can't get output for this program. But the program is right. What's the output?

def mystery(l): if len(l) < 2: return (l) else: return ([l[-1]] + mystery(l[1:-1]) + [l[0]]) What does mystery([23,13,71,66,28,55]) return?

19th Feb 2019, 1:47 PM
Roshini Manoharan
4 Respostas
+ 2
You just have to write: print ( >your last line here<) instead of your last line. Then you get the output.
19th Feb 2019, 2:57 PM
HonFu
HonFu - avatar
0
Please just put the code into Code Playground or your Python at home and check it for yourself.
19th Feb 2019, 2:19 PM
HonFu
HonFu - avatar
0
it better you write the code on code play ground, then share the link here, that way people will be able to help you easily
19th Feb 2019, 2:41 PM
✳AsterisK✳
✳AsterisK✳ - avatar
19th Feb 2019, 2:49 PM
Roshini Manoharan