but the linear scans of the first two techniques may make them faster much of the time the file mins py contains the code for all three solutionsdef min (*args)res args[ for arg in args[ :]if arg resres arg return res def min (first*rest)for arg in restif arg firstfirst arg return first def min (*args)tmp list(argstmp sort(return tmp[ orin python +return sorted(args)[ print(min ( )print(min ("bb""aa")print(min ([ , ][ , ][ , ])all three solutions produce the same result when the file is run try typing few calls interactively to experiment with these on your ownpython mins py aa [ notice that none of these three variants tests for the case where no arguments are passed in they couldbut there' no point in doing so here--in all three solutionspython will automatically raise an exception if no arguments are passed in the first variant raises an exception when we try to fetch item the second when python detects an argument list mismatchand the third when we try to return item at the end this is exactly what we want to happen--because these functions support any data typethere is no valid sentinel value that we could pass back to designate an errorso we may as well let the exception be raised there are exceptions to this rule ( you actuallythis is fairly complicated the python sort routine is coded in and uses highly optimized algorithm that attempts to take advantage of partial ordering in the items to be sorted it' named "timsortafter tim petersits creatorand in its documentation it claims to have "supernatural performanceat times (pretty goodfor sort!stillsorting is an inherently exponential operation (it must chop up the sequence and put it back together many times)and the other versions simply perform one linear left-toright scan the net effect is that sorting is quicker if the arguments are partially orderedbut is likely to be slower otherwise (this still holds true in test runs in even sopython performance can change over timeand the fact that sorting is implemented in the language can help greatlyfor an exact analysisyou should time the alternatives with the time or timeit modules--we'll see how in the min wakeup call