Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created February 21, 2019 23:41
Show Gist options
  • Save harrisonmalone/0e42011ddbbd6ef6400b5a8a775ab4c4 to your computer and use it in GitHub Desktop.
Save harrisonmalone/0e42011ddbbd6ef6400b5a8a775ab4c4 to your computer and use it in GitHub Desktop.
import numpy as np
def add_list(list, list2=None):
"""method that sums a list
Args:
list ([type]): list with 1 2 3 in it
list2 ([type], optional): Defaults to None. testing out how docstring
deals with default arguments
Returns:
[type]: Number
"""
return np.sum(list) # This adds a list
def another_method():
"""test method
"""
print('hello world')
print(1 + 1)
if __name__ == "__main__":
print('Started the program!')
sum_result = add_list([1, 2, 3])
print(sum_result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment