*(The OP only loosely specified the input & output method/format, so the following seems acceptable.)* Sage Notebook (<s>39 41</s> 40) --- In the current cell, f=lambda n,k:k<1or f(n-1,k-1)*n/k;+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 (<s>42 44</s> 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;+f(*x) *Both of these approaches are obviously spin-offs from earlier answers by others.*