Skip to content

lab-map-filter-reduce_MIKI_PUIG#16

Open
Miquelpg6 wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
Miquelpg6:main
Open

lab-map-filter-reduce_MIKI_PUIG#16
Miquelpg6 wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
Miquelpg6:main

Conversation

@Miquelpg6
Copy link
Copy Markdown

No description provided.

@bripollc
Copy link
Copy Markdown

Miki,

Awesome ✨
No tengo mucho a comentar ya que todas las respuestas son correctísimas.

  • Let's remove the first 568 words since they contain information about the book but are not part of the book itself.
for i in prophet[:568]:
    prophet.remove(i)
print(prophet)   

Ojito, te falta 1 elemento por eliminar🙃 Debes ajustar tu rango a [:568].

  • Let's write a function to split those words. Our function will return the string split on the character \n. Write your function in the cell below.
def line_break(x):
    x_split = x.split("\n")
    x_split = [line for line in x_split if line.strip() != '']
    return x_split

De esta manera eliminarás los espacios en blanco:) (aunque no te lo pide)

Por el Challenge 4 no te preocupes, son cosas que veremos estos días.

Ps: si al imprimir tus respuestas limitas el rango será más legible el notebook, jeje

image

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