Error in code even answer is matched


Why is this showing me this error even when my code has no significant difference from the provided answer.

Hi, Nikhil.

Your code is absolutely correct!
Kindly run the code again and check it.

All the best!

Hello sir, I’ve checked it but its still showing none as result and if i remove print and simply call the function, it’s not showing any output even though the code has been executed.
Although I’ve completed the module with the help from answer but I’m not yet satisfied as in why it isn’t accepting my code.
Thank you

Hi, Nikhil.

Kindly restart your server from the control panel at the right side and submit it, it should work.
Refer the below