3 ms·
When someone calls that, they wouldn't expect the input to be consumed. >>> list = [1,2,3] >>> sum(list)/len(list) >>> Traceback (most recent call last):
by lambda 11y ago
When someone calls that, they wouldn't expect the input to be consumed.
>>> list = [1,2,3]
>>> sum(list)/len(list)
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
- jakeogh 11y agoThanks. I keep forgetting py isnt working on a copy of the var. copy.deepcopy() kinda fixes it, but then memory use is doubled, and the recursion limit kills it all anyway. I better go read my py code...