Two lessons: 1. The accumulator pattern (starting with a value and updating it in a loop) works inside functions too.
2. Edge cases matter. Factorial of 0 should return 1. The loop handles this naturally because range(1, 1) is empty. Always test your functions with edge cases: 0, 1, negative numbers, empty inputs. They reveal bugs.