Statistics
4
Views
0
Downloads
0
Donations
Support
Share
Uploader

高宏飞

Shared on 2026-06-25

AuthorMeenu Kohli

Mastering Advanced Python Programming Key Features● In-depth coverage on fundamentals of functions, recursion, classes, inheritance, and files.● Mastery of advanced topics - Database connectivity, Errors and Exception, Testing and Debugging, threads, Data visualization, and Data analysis.● In-depth coverage of advanced concepts such as data structures, and algorithms.● Simplifies GUI and Widgets.Description Advance Core Python Programming is designed for Programmers who have a good understanding of Python basics and are ready to take the next steps. For entry-level Python programmers willing to dive deeper into programming, this book provides a path that will help them to add innovative features to their applications. This book starts by introducing you to the concept of Functions and Recursion and then moves on to higher levels of introducing you to OOP concepts, Files, integrating Python with database, threading, errors, exceptions, testing, debugging, data visualization, data analysis, GUI, data structures and algorithms. All these topics are the need of the hour and this book simplifies all these critical and essential concepts of Python for you. Throughout the book, you will have access to several coding examples which will help you to understand the real practical application of advanced Python concepts and you will be able to work on any kind of Python project with confidence. What you will learn ● Learn the essentials of Sentiment Analysis. ● Learn the essentials of Emotion Analysis. ● Conducting Emotion Analysis using Lexicons. ● Learn to develop Shiny applications. ● Learn to co Who this book is for This book is highly appealing to all tech-

AI Reading Assistant

Summary and highlights from this book's index; jump to passages in the text

Passage locations
Tags
No tags
ISBN: 9390684064
Publisher: BPB Publications
Publish Year: 2021
Language: 英文
Pages: 658
File Format: PDF
File Size: 11.3 MB
Support Statistics
¥.00 · 0times
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

(This page has no text content)
Advance Core Python Programming Begin your Journey to Master the World of Python Meenu Kohli www.bpbonline.com
FIRST EDITION 2021 Copyright © BPB Publications, India ISBN: 978-93-90684-06-9 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. Distributors:
BPB PUBLICATIONS 20, Ansari Road, Darya Ganj New Delhi-110002 Ph: 23254990/23254991 MICRO MEDIA Shop No. 5, Mahendra Chambers, 150 DN Rd. Next to Capital Cinema, V.T. (C.S.T.) Station, MUMBAI-400 001 Ph: 22078296/22078297 DECCAN AGENCIES 4-3-329, Bank Street, Hyderabad-500195 Ph: 24756967/24756400
BPB BOOK CENTRE 376 Old Lajpat Rai Market, Delhi-110006 Ph: 23861747 Published by Manish Jain for BPB Publications, 20 Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai www.bpbonline.com
Dedicated to My Husband, Capt. Rishi Raj Kohli I dreamt an impossible dream; you gave me the wings to chase it, and make it a reality.
About the Author Meenu author of “Python Interview Questions” and “Basic Core Python Programming” is presenting her next venture – “Advance Core Python Programming”. A BE (Electronics) from D.Y. Patil College of Engineering, Pune University, she has worked extensively as a Software Developer, Tester, and Trainer in reputed MNCs. She has experience of working on challenging projects across varied development environments such as Python, Java, EJB, C, C++, PHP, JSP, JavaScript, HTML, .NET, R, MySQL, Oracle, DB2. She is a keen observer and passionate learner. In addition to software development, she is also a professionally trained software tester and a certified Six Sigma Green Belt from the National Institute of Industrial Engineering – Mumbai. She has experience of teaching Electronics and Computer Science undergraduate students and has also imparted her knowledge to several software- development courses. She later diversified into writing technical books primarily related to Python.
About the Reviewers Prateek Gupta is a Data Enthusiast who loves data-driven technologies. Prateek has done his B.Tech in Computer Science & Engineering. He is currently working as a Data Scientist in an IT company. Prateek has 10 years of experience in the software industry, and is currently, working in the Computer Vision area. Prateek is also the author of the book “Practical Data Science with Jupyter”, Edition, published by the BPB Publications. Shayank Jain is a software developer, a data analyst, and an Author. He is passionate about coding and architectural design. He has more than 7.5+ years of professional experience in developing scalable software solutions for various organizations. He has been programming since the age of 16 and has developed software for mobile, web, hardware gaming, and standalone applications. After getting his hands dirty in programming, he found many new ways to debug and deploy the code successfully, with minimal time constraints. After reading and implementation, he found out that many critical concepts can be implemented easily into programming with correct and focused thinking. His research interests include information security, cryptography, analysis, design, and implementation of algorithms. He has extensively worked with python and implemented new ideas on various projects in his free time. He is also active in the computer science and education community.
Acknowledgements I would like to thank my husband and my two lovely children, Aananya and Ranbeer for all the help, support, and encouragement, without which I would not have been able to finish this book. When the lockdown was announced in early 2020, I thought my work would get affected, but my family ensured that I continue to work as per my schedule and finish the book on time. Thank you to BPB for allowing me to write this book and thank you for your support.
Preface There are several reasons why Python stands out from the other programming languages. The fact that you are right now holding a book on Advance level core Python Programming, indicates that you are already aware of the features that make Python so special. In this book, you will get detailed information on the advanced topics related to Python programming. It starts with the chapter on Functions. I would, therefore, like to suggest that kindly brush up your knowledge on the Python Basic concepts before you start with this book. If you are an absolute beginner, I would suggest that you first read ‘Basic Core Python Programming’, which is also a BPB publication, so that you can follow the topics given in this book. While working on this book, my main focus was on what is being taught in the most leading universities and what is in demand. I also focused on what problems the students and professionals face while learning to programme. By interacting with other programming enthusiasts, I realised that many people prefer self- study as they are busy with several other commitments or just cannot afford to join a course. I have designed this book like a self-learning course, providing detailed steps and breaking complex problems into simpler ones that can be easily be coded and then put back together. I am confident that with this book, you would be able to think, design, and create your Python applications.
This book is divided into the following 14 chapters: Chapter 1: Functions Chapter 2: Classes, Objects, and inheritance Chapter 3: Files Chapter 4: MySQL for Python Chapter 5: Python Threads Chapter 6: Errors, Exceptions, Testing, and Debugging Chapter 7: Data Visualization and Data Analysis Chapter 8: Creating GUI Form and Adding Widgets Chapter 9: My SQL and Python Graphical User Interface Chapter 10: Stack, Queue, and Deque Chapter 11: Linked Lists Chapter 12: Trees
Chapter 13: Searching and Sorting Chapter 14: Getting Started with Flask I hope you enjoy reading it as much as I enjoyed working on it. Happy reading and God bless!
Downloading the code bundle and coloured images: Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/fed28b Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.
Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at business@bpbonline.com for more details. At you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks.
BPB is searching for authors like you If you're interested in becoming an author for BPB, please visit www.bpbonline.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. The code bundle for the book is also hosted on GitHub at In case there's an update to the code, it will be updated on the existing GitHub repository. We also have other code bundles from our rich catalog of books and videos available at Check them out! PIRACY If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material. If you are interested in becoming an author
If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit REVIEWS Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit
Table of Contents 1. Functions and Recursion Introduction Structure Objective 1.1 What are functions? 1.2 Creating Functions 1.2.1 Simple Functions 1.2.1.1 Definition of a function 1.2.1.2 Function Body 1.2.1.3 Calling a function 1.2.2 Defining functions that take parameter 1.3 Functional arguments 1.3.1 Positional arguments 1.3.2 Default arguments 1.3.3 Keyword arguments 1.3.4 *args 1.3.5 **kwargs 1.4 The return statement 1.5 Scopes and namespace 1.5.1.Built-in namespace 1.5.2 Global namespace 1.5.3 Local namespace 1.6 Lambda functions 1.7 Recursion 1.7.1 Finding factorial of a number using recursion 1.7.2 Algorithm for finding factorial using recursion 1.7.3 Types of recursion
1.7.4 Advantages and disadvantages of recursion 1.8 Memoization Points to remember Conclusion Short questions and answers Coding questions and answers Descriptive questions and answers 2. Classes, Objects, and Inheritance Introduction Structure Objective 2.1 Classes and objects 2.1.1 The Employee class 2.2 Destructor __del__() 2.3 Types of class variables 2.4 Inheritance Points to remember Conclusion Multiple choice questions Answers Short questions and answers Coding questions and answers Descriptive questions and answers 3. Files Introduction Structure Objective 3.1 Advantages of storing data in files
3.2 Directory and file management with Python 3.3 Retrieve the directory current working directory using getcwd() 3.4 Checking contents of Python directory using listdir() 3.5 Create directory using mkdir() 3.6 Renaming a directory using rename() 3.7 Remove a directory using rmdir() 3.8 Working with files 3.8.1 open() and close() 3.8.2 Access mode in file writing 3.8.3 Writing to a binary file using “wb” access mode 3.8.4 Reading the contents of a binary file using “rb” access mode 3.8.5 Write and read strings with binary files 3.8.6 Other operations on binary file 3.8.7 File Attributes 3.9 Various File related methods Conclusion Multiple choice questions Answer Short questions and answers Coding questions and answers Descriptive questions and answers 4. MySQL for Python Introduction Structure Objectives 4.1 Installing and configuring MySql on your system 4.1.1 How to install MySQL 4.1.2 Configuration of MySQL 4.2 Creating a database in MySQL using the command line tool
4.2.1 Basic rules for writing SQL queries 4.3 Connect MySQL database to Python using MySQL connector 4.3.1 Create a database in Mysql using Python 4.3.2 Retrieve records from database using Python 4.4 Creating a database 4.4.1 Creating database directly using MySQL 4.4.2 Creating database using Python 4.5 Working with database using Python 4.5.1 Inserting records 4.5.2 Select records 4.5.2.1 Fetching all records from a table in Python using fetchall() 4.5.2.2 Fetching one record from a table in Python using fetchone() 4.5.3 Fetching selected records from a table in Python using the ‘WHERE’ clause151 4.5.4 Using ORDER BY clause 4.5.5 Deleting records using DELETE command 4.5.6 Update clause Conclusion Questions and answers 5. Python Threads Introduction Structure Objectives 5.1 Processes and threads 5.1.1 Process 5.1.2 Threads 5.2 How to create a thread 5.2.1 Implementation of new thread using threading module 5.3 Thread synchronization with Lock and RLock 5.4 Applying lock