A collection of sloppy snippets for scientific computing and data visualization in Python.
def sum(*addends): s = 0 for n in addends: s += n return s
print sum(1,2,3,4) 10 print sum(1,2,3) 6
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.