Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 13, 2022 00:23
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 parzibyte/4f4c94a38d1a76f5d02e2d2708888d6f to your computer and use it in GitHub Desktop.
Save parzibyte/4f4c94a38d1a76f5d02e2d2708888d6f to your computer and use it in GitHub Desktop.
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