Created
February 21, 2019 23:41
-
-
Save harrisonmalone/0e42011ddbbd6ef6400b5a8a775ab4c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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