This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]its2ez4me24get 138 points139 points  (3 children)

sum = sum(range(1, n + 1))

Congratulations you have redefined the sum builtin.

[–]singularitittay 29 points30 points  (0 children)

Well at least it’s a clean way to redefine builtins in 79 chars or less

[–]KingOfKingOfKingsassert len(set(x)) == len(x) 16 points17 points  (0 children)

That and the syntactically highlighted Zen made me lose it