1. 程式人生 > >python文本處理練習-3

python文本處理練習-3

處理 style urn span bsp 最小 turn python3 num

"計算數組中最小的兩個數的和"
#!usr/bin/python3
#-*- coding:utf-8 -*-

numbers=np.array((4,3,7,5,6))
def sum_two_smallest_numbers(numbers):
    numbers.sort()
    return numbers[0]+numbers[1]

python文本處理練習-3