One question for those who use python interview

Days ago, I got an interview with Amazon. The interviewer asked me a question, "Why do you put your helper function inside the function?". I was shocked because I have been writting in this way and solutions in python on leetcode are typically all written in this way. I think it is because he is not familiar with python. Anyway, is it a good practice to put helper funcs inside the function?

Comments (2)