Answer to Question #228309 in Python for Vamsi

Question #228309

Consider the following Python function.

def mystery(l):
    if l == []:
        return(l)
    else:
        return(mystery(l[1:])+l[:1])

What does mystery([22,34,18,57,92,45]) return?




1
Expert's answer
2021-08-22T00:28:08-0400

It returns: [45,92,57,18,34,22]


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS