Consider a function in JavaScript:
If val
is not defined in the first call, it becomes 0
function someRecursiveFn (item, val) {
val = val || 0;
...
}
How do I assign the same way in Python?
def someRecursiveFn(item, val):
val = ??
...