Book Image

Python Fundamentals

By : Ryan Marvin, Mark Nganga, Amos Omondi
Book Image

Python Fundamentals

By: Ryan Marvin, Mark Nganga, Amos Omondi

Overview of this book

After a brief history of Python and key differences between Python 2 and Python 3, you'll understand how Python has been used in applications such as YouTube and Google App Engine. As you work with the language, you'll learn about control statements, delve into controlling program flow and gradually work on more structured programs via functions. As you settle into the Python ecosystem, you'll learn about data structures and study ways to correctly store and represent information. By working through specific examples, you'll learn how Python implements object-oriented programming (OOP) concepts of abstraction, encapsulation of data, inheritance, and polymorphism. You'll be given an overview of how imports, modules, and packages work in Python, how you can handle errors to prevent apps from crashing, as well as file manipulation. By the end of this book, you'll have built up an impressive portfolio of projects and armed yourself with the skills you need to tackle Python projects in the real world.
Table of Contents (12 chapters)
Python Fundamentals
Preface

Summary


Congratulations! You now have a good understanding of modules and packages and how they function in Python. You can now go ahead and use the structuring methods you have learned to build even larger applications.

Large frameworks written in Python, such as Django and Flask, use the same principles of modules and packages that you have learned here. For reference, check out the Flask project source code on GitHub to see how files are arranged in a real-life project. You will notice that the same concepts that you just learned about are in use.

As we said in the introduction, working with data in files is a fact of any developer's life. Python, as a general-purpose scripting language, comes with a lot of built-in tools to help you read, manipulate, and write to files very easily in your program. You should now have a good grasp of how to use these tools to not only manipulate text files but also to work with more complex data such as CSV files. In our final chapter activity, you had...