factorial coding question and such
Implement factorial(n) to return the factorial of a nonnegative integer. Use the signature def factorial(n):; the input is an integer and the output is an integer, with 0! = 1. Prefer an iterative solution so the function handles large valid inputs without recursion depth issues.
def factorial(n):