(The OP only loosely specified the input method & formatoutput method/format, so the following seems acceptable.)
Sage Notebook (3939 41 40)
In the current cell,
f=lambda n,k:k<1or f(n-1,k-1)*n/k;fk;+f(*_)
where the input in the form n,k
is entered & evaluated in the preceding cell. This simulates "command-line input" by assigning it to _
(similar to command-line arguments).
Sage Notebook (4242 44 43)
Alternatively, using "in-source input" (with only the x=
and newline characters adding to the score), e.g.,
x=5,2
f=lambda n,k:k<1or f(n-1,k-1)*n/k;fk;+f(*x)
Both of these approaches are obviously spin-offs from earlier answers by others.