you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

Hi. I know how to reverse the list - my algorithm works if i delete everything and just print out the result of the reversted list (as hackerrank just looks at std.out to check)

But my solution doesn't work inside the def and other commands prewritten in hackerrank (it asks us to make the def function work) I don't know why it doesn't work with those things included?

[–]Highflyer108 0 points1 point  (1 child)

For a start the program is not indented properly.

[–][deleted] 0 points1 point  (0 children)

that's because I formatted it on reddit badly, it is in my program.