Comment on Python Multiple Assignment Is a PuzzleparentComments−falcor8412yJust wanted to add a more functional solution: def miss_pos(a): b = range(1, len(a)+2) return min(set(b).difference(a)) It's probably not as efficient, but remember the first rule of optimization: http://c2.com/cgi/wiki?FirstRuleOfOptimization−innguest12yI wonder why so much discussion about arbitrary rules of assignment when the solution to the problem can be written (and is more readable) without ever mentioning this complicated "assignment" feature.
Comments
Just wanted to add a more functional solution:
It's probably not as efficient, but remember the first rule of optimization: http://c2.com/cgi/wiki?FirstRuleOfOptimizationI wonder why so much discussion about arbitrary rules of assignment when the solution to the problem can be written (and is more readable) without ever mentioning this complicated "assignment" feature.