Book Description
Extremely versatile and popular among developers, Python is a good general-purpose language that can be used in a variety of applications. For those with an understanding of English, Python is a very humanreadable programming language, allowing for quick comprehension. Because Python supports multiple styles including scripting and object-oriented programming, it is considered to be a multi-paradigm language that enables programmers to use the most suitable style to complete a project. Increasingly used in industry, Python offers a lot of potential for those who would like to begin coding while also being a good choice for those looking to pick up an additional programming language.
Learning the key concepts of Python can help you understand how programs work while also imparting foundational logic that can serve you in other domains. Understanding what Python and computer programming can offer you both as a user and as a developer is important as technology is further integrated into daily life.
This open book is licensed under a Creative Commons License (CC BY-NC-SA). You can download How To Code in Python 3 ebook for free in PDF format (5.0 MB).
Table of Contents
Python 2 vs Python 3: Practical Considerations
How To Install Python 3 and Set Up a Local Programming Environment
How To Write Your First Python 3 Program
How To Work with the Python Interactive Console
How To Write Comments
Understanding Data Types
An Introduction to Working with Strings
How To Format Text
An Introduction to String Functions
How To Index and Slice Strings
How To Convert Data Types
How To Use Variables
How To Use String Formatters
How To Do Math with Operators
Built-in Python 3 Functions for Working with Numbers
Understanding Boolean Logic
Understanding Lists
How To Use List Methods
Understanding List Comprehensions
Understanding Tuples
Understanding Dictionaries
How To Import Modules
How To Write Modules
How To Write Conditional Statements
How To Construct While Loops
How To Construct For Loops
How To Use Break, Continue, and Pass Statements when Working with Loops
How To Define Functions
How To Use *args and **kwargs
How To Construct Classes and Define Objects
Understanding Class and Instance Variables
Understanding Inheritance
How To Apply Polymorphism to Classes
How To Use the Python Debugger
How To Debug Python with an Interactive Console
How To Use Logging
How To Port Python 2 Code to Python 3