返回一個列表數組,擁有指定的開頭和結尾的數字

def find_multiples(lower_limit, upper_limit): return list(range(lower_limit, upper_limit + 1, step)) find_multiples(5, 25, 5) # [5, 10, 15, 20, 25] 在實際應用中,一般指定開頭結尾的等差數列能夠用不少其餘方法來實現,好比在導入numpy包的前提下使
相關文章
相關標籤/搜索