Skip to content

[Uri] lab-errhand-listcomp#14

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

[Uri] lab-errhand-listcomp#14
UriCVV wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
UriCVV:main

Conversation

@UriCVV
Copy link
Copy Markdown

@UriCVV UriCVV commented Oct 16, 2023

No description provided.

@bripollc
Copy link
Copy Markdown

Hello Uri:)

YESSSSSS! Buen lab e hiciste el bonus, increíble:) well dooooooone (de verdad, que gusto corregir labs así) 💥💣🫨 Te dejo una cosilla (sin importancia).

  • Remove all of the vowels in a string. Hint: make a list of the non-vowels. Use non_vowels as the name of the list.
non_vowels = [i for i in teststring if i.lower() not in ["a", "e", "i", "o", "u" ] and i != ' ']
print(non_vowels)

Correctísima tu respuesta! Solo te dejo un pequeño tip! En tu código estás eliminando los espacios solo cuando haces el 'print()'. Si añades and i != ' ', eliminarás los espacios de la lista independientemente de la manera en la que la imprimas y estarás devolviendo una lista. Haciendo "".join estas devolviendo una string.

A por el próximo laaaaaaab! 💥

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