i have a set which contains many words/strings. i want to delete one. but
setname.remove(theword)
will raise KeyError if it is not already in there. in my case, it may not. so i can do if word in setname: setname.remove(theword)
. does that slow it down much? this is going to be in a heavy execution part of my code? any fast way to do this? the number of different words to be deleted is just 4. would it be better to keep the 4 words as 4 sets (each containing 1 word) and doing setname -= thewordset
.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.