Book description
Learn the fundamentals of Python (3.7) and how to apply it to data science, programming, and web development. Fully updated to include hands-on tutorials and projects.
Key Features
- Learn the fundamentals of Python programming with interactive projects
- Apply Python to data science with tools such as IPython and Jupyter
- Utilize Python for web development and build a real-world app using Django
Book Description
Learn Python Programming is a quick, thorough, and practical introduction to Python - an extremely flexible and powerful programming language that can be applied to many disciplines.
Unlike other books, it doesn't bore you with elaborate explanations of the basics but gets you up-and-running, using the language. You will begin by learning the fundamentals of Python so that you have a rock-solid foundation to build upon.
You will explore the foundations of Python programming and learn how Python can be manipulated to achieve results. Explore different programming paradigms and find the best approach to a situation; understand how to carry out performance optimization and effective debugging; control the flow of a program; and utilize an interchange format to exchange data. You'll also walk through cryptographic services in Python and understand secure tokens.
Learn Python Programming will give you a thorough understanding of the Python language. You'll learn how to write programs, build websites, and work with data by harnessing Python's renowned data science libraries. Filled with real-world examples and projects, the book covers various types of applications, and concludes by building real-world projects based on the concepts you have learned.
What you will learn
- Get Python up and running on Windows, Mac, and Linux
- Explore fundamental concepts of coding using data structures and control flow
- Write elegant, reusable, and efficient code in any situation
- Understand when to use the functional or OOP approach
- Cover the basics of security and concurrent/asynchronous programming
- Create bulletproof, reliable software by writing tests
- Build a simple website in Django
- Fetch, clean, and manipulate data
Who this book is for
Learn Python Programming is for individuals with relatively little experience in coding or Python. It's also ideal for aspiring programmers who need to write scripts or programs to accomplish tasks. The book shows you how to create a full-fledged application.
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Foreword
- Contributors
- Preface
-
A Gentle Introduction to Python
- A proper introduction
- Enter the Python
- About Python
- What are the drawbacks?
- Who is using Python today?
- Setting up the environment
- Installing Python
- How you can run a Python program
- How is Python code organized?
- Python's execution model
- Guidelines on how to write good code
- The Python culture
- A note on IDEs
- Summary
- Built-in Data Types
- Iterating and Making Decisions
-
Functions, the Building Blocks of Code
- Why use functions?
- Scopes and name resolution
- Input parameters
- Return values
- A few useful tips
- Recursive functions
- Anonymous functions
- Function attributes
- Built-in functions
- One final example
- Documenting your code
- Importing objects
- Summary
- Saving Time and Memory
-
OOP, Decorators, and Iterators
- Decorators
-
Object-oriented programming (OOP)
- The simplest Python class
- Class and object namespaces
- Attribute shadowing
- Me, myself, and I – using the self variable
- Initializing an instance
- OOP is about code reuse
- Accessing a base class
- Multiple inheritance
- Class and static methods
- Private methods and name mangling
- The property decorator
- Operator overloading
- Polymorphism – a brief overview
- Data classes
- Writing a custom iterator
- Summary
-
Files and Data Persistence
- Working with files and directories
- Data interchange formats
- IO, streams, and requests
- Persisting data on disk
- Summary
- Testing, Profiling, and Dealing with Exceptions
- Cryptography and Tokens
-
Concurrent Execution
- Concurrency versus parallelism
- Threads and processes – an overview
- Concurrent execution in Python
- Case examples
- Summary
- Debugging and Troubleshooting
- GUIs and Scripts
- Data Science
- Web Development
- Other Books You May Enjoy
Product information
- Title: Learn Python Programming - Second Edition
- Author(s):
- Release date: June 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788996662
You might also like
book
Learn Python Programming - Third Edition
Get up and running with Python 3.9 through concise tutorials and practical projects in this fully …
book
Learning Python, 5th Edition
Get a comprehensive, in-depth introduction to the core Python language with this hands-on book. Based on …
book
Think Python, 2nd Edition
If you want to learn how to program, working with Python is an excellent way to …
book
Head First Python, 2nd Edition
Want to learn the Python language without slogging your way through how-to manuals? With Head First …