[pyar] [Consulta] sort() y sorted()
Ezequiel Szturmaj
ezequiel.sz86 en gmail.com
Lun Jun 10 19:00:16 ART 2013
Buenas!
"Python lists have a built-in sort() method that modifies the list in-place and
a sorted() built-in function that builds a new sorted list from an
iterable." [0]
Es decir, sort() ordena la lista "in-place" que le pasás como argumento,
mientras que sorted() crea una nueva (y ordenada) a partir de la que le dás.
Saludos!
[0]http://wiki.python.org/moin/HowTo/Sorting
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20130610/f8d54a78/attachment.html>
More information about the pyar
mailing list