Python Internals for Developers
eBook - ePub

Python Internals for Developers

Practice Python 3.x Fundamentals, Including Data Structures, Asymptotic Analysis, and Data Types

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Python Internals for Developers

Practice Python 3.x Fundamentals, Including Data Structures, Asymptotic Analysis, and Data Types

About this book

Concise Interpretation of every essential element of Python with Use-cases

Key Features
? Numerous examples and solutions to assist beginners in understanding the concept.
? Contains visual representations of data structures.
? Demonstrations of how to use data structures with a Python implementation.

Description
This book will aid you in your learning of the Python 3.x programming language. The chapters in this book will benefit every aspect of a programmer's or developer's life by preparing them to solve problems using Python programming and its key data structures and internals.This book explains the built-in and user-defined data structures in Python 3.x. The book begins by introducing Python, its fundamental data structures, and asymptotic notations. Once you master the fundamentals of Python, you'll be able to fully comprehend the built-in data structures. The book covers real-world applications to understand user-defined data structures and their actual implementation. Towards the end, it will help you investigate how to solve practical problems by first comprehending the issue at hand.After reading this book, you will be able to identify data structures and utilize them to solve a specific problem. You will learn about various algorithm implementations in Python and use this knowledge to advance your Python skills.After reading this book you will be able to plan your application's migration to containers, prepare for Docker and Kubernetes Certifications, or apply for six digit DevOps jobs.

What you will learn
? Calculate the complexity of time and space using asymptotic notations.
? Discover Python 3.x's built-in and user-defined data structures.
? Create user-defined data structures from the bottom up.
? Make use of libraries to create new user-defined data structures.
? Determine and implement the most appropriate data structure for resolving issues.

Who this book is for
This book caters to those who want to enhance their careers as application developers, machine learning engineers, or researchers. Knowing basic programming concepts will be good, but not mandatory.

Table of Contents
1. Python
2. Data Types
3. Algorithm Analysis
4. Data Structure Introduction
5. List
6. Dictionary
7. Tuple
8. Sets
9. Arrays
10. Stack
11. Queue
12. Trees
13. Linked Lists
14. Graphs
15. HashMaps
16. Practical Problem Solutions

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Python Internals for Developers by Sonam Chawla Bhatia in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

CHAPTER 1

Python: A Quick Recap

Introduction

Python is one of many programming languages which exist in the software world to help developers solve real-time problems. Programming language is a formal language like English, Hindi, Spanish, and so on. Just like English or any other language used by humans to communicate with each other, the programming language is used for communication between humans and computers.
Many programming languages exist for human-computer communication. Now you must be wondering why we need so many programming languages for the same task, that is, communication. The following are some of the reasons why so many languages exist:
  • Some languages are easier to read and maintain than others.
  • All languages have different performance for different applications.
  • Different languages are suitable for solving different problems. For example, HTML can be used for developing websites and C language is best for embedded software development.
  • Languages differ in support of libraries to support common functions.
  • Some languages have fewer vulnerabilities than others, thus making them more secure. For example, Java is more secure than C.
Thus, developers choose the programming language based on the problem to be solved, the infrastructure to be used, and the type of software to be developed.

Structure

In this chapter, we will discuss the following topics:
  • Understanding Python
  • Variables and expressions
    • Variables
      • Variable names
    • Operators
      • Arithmetic operators
      • Comparison operators
      • Logical operators
      • Identity operators
      • Membership operators
      • Bitwise operators
      • Assignment operators
      • Operator precedence
    • Expressions
    • Comments
  • Conditional statements
    • The if statement
    • The if…else statement
    • The if…elif…else statement
    • The nested conditional statements
  • Loops and iterations
    • The while loop
    • The for loop
    • The break statement
    • The continue statement
  • Functions
    • Pre-defined functions

Objectives

By the end of this chapter, you will be able to install Python in your systems. You will be able to understand Python syntax and write basic programs in Python. You will get basic knowledge of interactive and script mod in Python. You will get an idea of how to write and run Python programs in both modes and also be able to understand the concept of functions in Python and how they are implemented.

Understanding Python

Python is a high-level language like C++, Java, and so on. High-level languages are more understandable by humans than low-level languages. High-level languages hide register, memory details from the developer. The computer understands low-level languages such as machine/assembly language. High-level languages convert solutions written in high-level languages to low-level languages.
Figure 1.1: Compiler takes source code and converts it into machine language code (executable file)
Python is an interpreted language. Table 1.1 shows the difference between Interpreted languages and Compiled...

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication Page
  5. About the Author
  6. About the Reviewer
  7. Acknowledgements
  8. Preface
  9. Errata
  10. Table of Contents
  11. 1. Python: A Quick Recap
  12. 2. Data Types
  13. 3. Asymptotic Analysis
  14. 4. Data Structure
  15. 5. List
  16. 6. Dictionary
  17. 7. Tuple
  18. 8. Set
  19. 9. Arrays
  20. 10. Stack
  21. 11. Queue
  22. 12. Tree
  23. 13. Linked List
  24. 14. Graph
  25. 15. HashMap
  26. 16. Practical Problem Solutions
  27. Index