Skip to content

Patricia S-list-comprehension finished exercices - #8

Open
psaeztorres wants to merge 1 commit into
Ironhack-data-bcn-oct-2023:mainfrom
psaeztorres:main
Open

psaeztorres wants to merge 1 commit into
Ironhack-data-bcn-oct-2023:mainfrom
psaeztorres:main

Conversation

@psaeztorres

Copy link
Copy Markdown

be happy!

@bripollc

Copy link
Copy Markdown

Hola Patricia,

Muy buen lab! Felicidades 🙌🏼 Continua así!!! Te dejo solo un pequeño detalle:

  • Add a condition to the list comprehension above so that only values greater than or equal to 0.5 are printed.
flat_list = [j for i in a for j in i if j >= 0.5]
print(flat_list)

Tu código está perfecto!! Solo te dejo aquí otra opción que combina ambos for loops en una misma comprehension list para no tener que referenciar la lista del ejercicio anterior.

@psaeztorres

psaeztorres commented Oct 15, 2023 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants