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

list = ["Life","The Universe","Everything","Jack","Jill","Life","Jill"] # Make a copy of the list. copy = list[:] # Sort the copy copy.sort() prev = copy[0] del copy[0] count = 0 # Go through the list searching for a match while count < len(copy) and copy[count] != prev: prev = copy[count] count = count + 1 whats going on

OpenStudy (anonymous):

Well, they are experimenting with the things you can do with a list. This will explain all the expressions they used if you're unfamiliar with the terms: http://www.greenteapress.com/thinkpython/thinkCSpy/html/chap08.html

OpenStudy (anonymous):

Not much to be honest. It essentially finds the first ordered duplicate in the list and stores it in the variable "prev".

OpenStudy (anonymous):

should i one whole text first ? how to think like a computer scientist

OpenStudy (anonymous):

Are you following the syllabus of the class? There are reading suggestions with each lecture. http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/readings/

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!