-
-
Save parzibyte/4f4c94a38d1a76f5d02e2d2708888d6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for linea in archivo: | |
linea = linea.rstrip("\n") # Quitar salto de línea | |
columnas = linea.split(separador) | |
nombre = columnas[0] | |
edad = int(columnas[1]) | |
altura = float(columnas[2]) | |
matricula = columnas[3] | |
alumnos.append({ | |
"nombre": nombre, | |
"edad": edad, | |
"altura": altura, | |
"matricula": matricula, | |
}) | |
return alumnos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment