Skip to the content ForoHackers
Log inJoin

Python: list(zip(nombres, puntos)) se ha comido al último jugador

AlgorithmsDebuggingPython
#16764 · · Quote · Report

en septiembre aprendí que no venir al torneo y llevarse cero puntos son cosas distintas. hoy SÍ estaba la tercera jugadora. tres nombres, dos puntuaciones. list(zip(["Luz", "Rui", "Sol"], [9, 4])) me deja a Sol en su casa sin decirle ni mu. ¿qué le he hecho? lleva toda la tarde jugando al dominó conmigo.

#16843 · · Quote · Report

el zip normal se para cuando termina la entrada más corta. si las longitudes deben coincidir, en Python reciente prueba list(zip(nombres, puntos, strict=True)). ahí sí protesta.

#16844 · · Quote · Report

ValueError. ok, por lo menos ahora se queja el ordenador en vez de una señora con seis dobles y bastante puntería.

#16845 · · Quote · Report

no metas cero por rellenar, wey. ¿sabes que perdió o sabes que te falta su casilla?

#16846 · · Quote · Report

le llamé. ganó con siete y le había mandado el resultado al móvil de mi hermano. le llevé el renglón que faltaba y me ha preguntado si el programa cuenta también los cafés que debe él.

#16847 · · Quote · Report

did your brother forward Sol's original words? I look after a chess sheet and have twice copied a number the messenger was giving as an EXAMPLE. once accused a man of beating himself as black.

#16848 · · Quote · Report

le enseñé a Sol la hoja con su siete y me corrigió el apellido, wey. si sólo consulto a mi hermano ahora podría llamarse Pepe y saldría en el registro con circunflejo.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply