Files
30-seconds-of-code/test/min_n/min_n.py
Rohit Tanwar 385bf72a3e readme-script
2018-02-20 22:42:11 +05:30

7 lines
118 B
Python

from copy import deepcopy
def min_n(arr, n=1):
numbers = deepcopy(arr)
numbers.sort()
return numbers[:n]