Skip to content

[Felix] lab-dict-sets-tuple - #19

Open
imfap1 wants to merge 3 commits into
Ironhack-data-bcn-oct-2023:mainfrom
Ironhack-Bootcamp:main
Open

imfap1 wants to merge 3 commits into
Ironhack-data-bcn-oct-2023:mainfrom
Ironhack-Bootcamp:main

Conversation

@imfap1

@imfap1 imfap1 commented Oct 10, 2023

Copy link
Copy Markdown

No description provided.

@bripollc

bripollc commented Oct 11, 2023

Copy link
Copy Markdown

Hola Felix,

Felicidades!!!!!!!!! Tengo poco que decirte porque has hecho un muy buen segundo lab:)

Challenge 1: todo correcto, impecable!

Challenge 2:

  1. What is the relationship among the following values:
    len(set1) == ( len(set3) + len(set5) )

Aquí te pedia relaciones entre los sets. Te dejo un ejemplo. Si lo ejecutas te tendría que salir True:) En tu caso: set1(80) = set3(33) + set5(47)

  1. Check if set1 contains set2 using the Python Set issubset method. Then check if set1 contains set3.*
print(set2.issubset(set1))
print(set3.issubset(set1))

Ojo! Lo has hecho al revés.

  1. Using the pop method, remove the first element from set1.
set1_list = list(set1)
set1_list.pop(0)
set1_list_pop = set(set1_list)  # And we convert it back to a set
print(set1_list_pop)

The pop method removes an element randomly, thus we could convert it to list to pop the first element.

✨Challenge 3: todo correcto, está perfecto!

sigue así!!!!! 🚀🚀

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