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 !!
Created at: 2014/09/17 07:16; Updated at: 2019/12/10 12:54