published by whitemice on Thu, 09/27/2012 - 07:00
Need a method to accurately count the number of weekdays between two days? [The key here is "accurately", it is a bit harder than it seems at first]. In Python there are several ways to do this, but most involve some iteration or list comprehension. In my opinion, if you have to do that, you are probably violating the Python idiom of "use the batteries".