In ps3 problem 2, you are asked to return a tuple of the postions a key string matches a target string. My first thought was to add each postion to the tuple every time a postion was found. However, the python wiki book states that you can not add to a tuple (http://en.wikibooks.org/wiki/Python_Programming/Sequences)
Since the lecturer seems to get lists and tuples mixed up a lot, is it possible that the question is wrong?
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
The other option I can think of would be to assign each postion to a variable 1st then declare them as a tuple at the end, this seems silly if you dont know how many answers there will be.
Unless you make a list and then declare that list as a tuple at the end??