Skip to content

Instantly share code, notes, and snippets.

@weihanchen
Created September 16, 2023 00:50
Show Gist options
  • Save weihanchen/f99fb44524263fb0b1fce5a98d27bded to your computer and use it in GitHub Desktop.
Save weihanchen/f99fb44524263fb0b1fce5a98d27bded to your computer and use it in GitHub Desktop.
# |- <套件包名稱>
# |- core.py
from typing import List
def sum_array(arr: List[int]) -> int:
"""陣列總和器
Args:
arr (List[int]): 整數陣列元素
Returns:
總和
"""
total = 0
for num in arr:
total += num
return total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment