Introduction
摘要
This chapter presents some background material in Python. We are not writing a Python textbook, and therefore, we are not providing all the material needed to learn the full use and structure of the language. Instead, we are concentrating on the material that is necessary for the following chapters. We introduce the Python data types used in this book, focusing on string, list, tuple, dictionary, and Boolean. We provide a Python library structure guide to clarify terms like module, class, function, method, and attribute. We then briefly introduce five Python libraries: NumPy, SymPy, Pandas, scikit-learn, and Matplotlib, which will be used extensively in the later chapters. We finish this chapter by showing how to use the control flow structures such as if statements, for loops, and while loops, and how to define your own functions in Python. Readers who already know Python well may skip this chapter.