Given points $P_1, P_2,\cdots,P_7$ on a straight line, in the order stated (not necessarily evenly spaced). 
Let $P$ be an arbitrarily selected point on the line and let $s$ be the sum of the undirected lengths
$PP_1, PP_2, \cdots , PP_7$. Then $s$ is smallest if and only if the point $P$ is:
$\textbf{(A)}\ \text{midway between }P_1\text{ and }P_7\qquad \\ \textbf{(B)}\ \text{midway between }P_2\text{ and }P_6\qquad \\ \textbf{(C)}\ \text{midway between }P_3\text{ and }P_5\qquad \\ \textbf{(D)}\ \text{at }P_4 \qquad \textbf{(E)}\ \text{at }P_1$
By the [Triangle Inequality](https://artofproblemsolving.com/wiki/index.php/Triangle_Inequality), $P_1P + P_7P \ge P_1P_7$, with equality happening when $P$ is between $P_1$ and $P_7$. Using similar logic, $P$ must be between $P_3$ and $P_5$ in order for the distance to be minimized.
The only point left to deal with is $P_4$ (which is also between $P_3$ and $P_5$).  The minimum possible distance is $0$ (when $P$ is on $P_4$), so the answer is $\boxed{\textbf{(D)}}$.