This book is intended as a study aid for numerical optimization techniques in undergraduate as well as postgraduate degree courses in mechanical engineering at universities. Such procedures become more and more important in the context of lightweight design where a weight reduction may directly result, for example in the case of automotive or aerospace industry, in a lower fuel consumption and the corresponding reduction of operational costs as well as beneficial effects on the environment. Based on the open-source programming language Python, the authors offer routines to numerically solve problems from the context of engineering mathematics as well as applications taken from the classical courses of strength of materials. The mechanical theories focus on the classical one-dimensional structural elements, i.e., springs, bars, and Euler–Bernoulli beams. Focusing on simple structural members reduces the complexity of the numerical framework, and the resulting design space is limited to a low number of variables. The use of a general-purpose programming language and the available libraries, e.g., for derivatives or equation solving, allows to focus more on the methodology of the optimization methods and not on standard procedures. Some of the provided examples should be also solved in a graphical approach based on the objective function and the corresponding design space to better understand the computer implementation.