Can you please correct my code?

I am getting the output, please rectify the error.

Hey @kodivine0,

Mistake:
The order of the odd numbers in the output is reversed.
Example:
5
1 2 3 4 5
Expected Output:
1 3 5 2 4
Your Output:
5 3 1 2 4

Correct it.
Hope, this would help.

If there are only odd nos, then do we need to change the output?

Hello @kodivine0,

No, you don’t.
first in the list will come first.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.