Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Created February 20, 2019 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrroot5/b890ae5573f2d4f22d2b6d729e819a78 to your computer and use it in GitHub Desktop.
Save mrroot5/b890ae5573f2d4f22d2b6d729e819a78 to your computer and use it in GitHub Desktop.
Número mínimo de una lista de python
from copy import deepcopy
def min_n(lst, n=1):
numbers = deepcopy(lst)
numbers.sort()
return numbers[:n]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment