8 ms·
def add_1(x): return sum([1,x]) Python. Too simple? I didn't use any of the signs, and it demonstrates knowledge of the python standard library! EDIT: Whoop
by bobwebb 15y ago
def add_1(x):
return sum([1,x])
Python.
Too simple? I didn't use any of the signs, and it demonstrates knowledge of the python standard library!
EDIT: Whoops, seems the idea of using the sum() function (or operator) has been dismissed elsewhere. Time to study some more languages, I think.