Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 15 Online
OpenStudy (anonymous):

Does anyone have their code for part 4 of problem set 3? I am trying to figure out an easy way to eliminate exact matches from the tuple.

OpenStudy (anonymous):

turn your tuples to lists (lists have lots of useful methods - like remove) iterate over the list of match indices and if the index is IN the exactmatch list, remove it or iterate over the list of exactmatch indices and remove all instances of an exactmatch index from the match list turn the list back into a tuple the in and not in operators can be helpful http://docs.python.org/reference/expressions.html#notin

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!