• which is the difference ? which way is faster ?

Question related to mission Secret Message

 

which is the difference ? which way is faster ?

return "".join([letter for letter in text if letter.isupper()]) # This one use []

return "".join((letter for letter in text if letter.isupper())) # This one use ()

What is a better idea using [] or using () ?

thank you !!

9