-
-
Save parzibyte/eea43a0eaaa28b683f12cc31755a4d33 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
import csv | |
""" | |
https://parzibyte.me/blog | |
""" | |
nombre_archivo = "videojuegos.csv" | |
with open(nombre_archivo, "r") as archivo: | |
lector = csv.reader(archivo, delimiter=",") | |
# Omitir el encabezado | |
next(lector, None) | |
for fila in lector: | |
# Tenemos la lista. En la 0 tenemos el nombre, en la 1 la calificación y en la 2 el precio | |
nombre = fila[0] | |
calificacion = int(fila[1]) | |
precio = float(fila[2]) | |
print( | |
f"Juego: '{nombre}' con calificación {calificacion} y precio {precio}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment