In this chapter, we discuss two modules in Python: re, which contains functions that can be applied for regular expressions, and SymPy, for solving mathematical problems in algebra, calculus, probability, and set theory. Concepts that we will learn in this chapter, like searching and replacing strings, probability, and plotting graphs, will come in handy for subsequent chapters, where we cover data analysis and statistics.
Regular expressions
A regular expression is a pattern containing both characters (like letters and digits) and metacharacters ...