Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Python Core Module

Module01 Introduction of Python

What is Python?
Why python is popular
Setup Python Environment
Interactive mode
IDE mode
Familiar with CMD

Module 02 Type & Operator

Core Data Types of Python

Number
Strings
Lists
Dictionaries
Tuples
Sets

Operators in Python
1. What are operators in Python?
2. Arithmetic Operators
3. Comparison (Relational) Operators
4. Logical (Boolean) Operators
5. Bitwise Operators
6. Assignment Operators
7. Special Operators
o Identity Operator
o Membership Operator

Loops & Control flow in Python


1. while loop
2. for loop
3. if-else Statement
4. pass statement
5. break statement
6. continue statement

Numeric Types
Numeric Type Basics
Numeric Literals
Built-in Numeric Tools
Numbers in Action
Variables and Basic Expressions
Numeric Display Formats
Comparisons: Normal and Chained
Division: Classic, Floor, and True
Integer Precision
Complex Numbers
Hex, Octal, Binary: Literals and Conversions

String Fundamentals
This Chapter’s Scope
Unicode: The Short Story
String Basics
String Literals
Single- and Double-Quoted Strings Are the Same
Escape Sequences Represent Special Characters
Raw Strings Suppress Escapes
Triple Quotes Code Multiline Block Strings
Strings in Action
Basic Operations
Indexing and Slicing
String Conversion Tools
Changing Strings I
String Methods
Method Call Syntax
Methods of Strings

Lists and Dictionaries


Lists
Lists in Action
Basic List Operations
List Iteration and Comprehensions
Indexing, Slicing, and Matrixes
Changing Lists in Place
Dictionaries
Dictionaries in Action
Basic Dictionary Operations
Changing Dictionaries in Place
More Dictionary Methods
Example: Movie Database
Dictionary Usage Notes
Other Ways to Make Dictionaries

Tuples

Tuples in Action
Why Lists and Tuples?
Records Revisited: Named Tuples
Sets
Sets in Action

Modules 03 Functions in Python


Functions
Function Basics
Why Use Functions?
Coding Functions
def Statements
def Executes at Runtime
A First Example: Definitions and Calls
Definition
Calls
Polymorphism in Python
A Second Example: Intersecting Sequences
Definition
Calls
Polymorphism Revisited
Local Variables
Scopes
Python Scope Basics
Scope Details
Name Resolution: The LEGB Rule
The Built-in Scope
The global Statement
Program Design: Minimize Global Variables
Program Design: Minimize Cross-File Changes
Other Ways to Access Globals
Scopes and Nested Functions
Nested Scope Details
Factory Functions: Closures
Retaining Enclosing Scope State with Defaults
The nonlocal Statement
nonlocal Basics
nonlocal in Action

Arguments
Argument-Passing Basics
Arguments and Shared References
Avoiding Mutable Argument Changes
Simulating Output Parameters and Multiple Results
Special Argument-Matching Modes
Argument Matching Basics
Argument Matching Syntax
The Gritty Details
Keyword and Default Examples
Arbitrary Arguments Examples
Python 3.X Keyword-Only Arguments
Module 04 Modules and Package
Modules: The Big Picture
Why Use Modules?
Python Program Architecture
How to Structure a Program
Imports and Attributes
Standard Library Modules
How Imports Work
1. Find I
2. Compile It (Maybe)
3. Run It
Module Coding Basics
Module Creation
Filenames
Other Kinds of Modules
Module Usage
The import Statement
The from Statement
The from * Statement
Imports Happen Only Once
import and from Are Assignments
import and from Equivalence
Potential Pitfalls of the from Statement
Module Namespaces
Files Generate Namespaces
Namespace Dictionaries: __dict__
Attribute Name Qualification
Imports Versus Scopes
Namespace Nesting 699 Reloading Modules

Module Packages
Import Basics
Packages and Search Path Settings
Package __init__.py Files
Package Import Example
from Versus import with Packages
Why Use Package Imports?

Module 05 Classes and OOP


OOP: The Big Picture
Why Use Classes?
OOP from 30,000 Feet
Attribute Inheritance Search
Classes and Instances
Method Calls
Coding Class Trees
Operator Overloading
OOP Is About Code Reuse
Class Coding Basics
Classes Generate Multiple Instance Objects
Class Objects Provide Default Behavior
Instance Objects Are Concrete Items
Classes Are Customized by Inheritance
A Second Example
Classes Are Attributes in Modules
Classes Can Intercept Python Operators
A Third Example
Why Use Operator Overloading?
The World’s Simplest Python Class
Records Revisited: Classes Versus Dictionaries

Operator Overloading
The Basics
Constructors and Expressions: __init__ and __sub__
Common Operator Overloading Methods

Exceptions and Tools


Exception Basics
Why Use Exceptions?
Exception Roles
Exceptions: The Short Story
Default Exception Handler
Catching Exceptions
Raising Exceptions
User-Defined Exceptions
Exception Coding Details
The try/except/else Statement
How try Statements Work
try Statement Clauses
The try else Clause
Example: Default Behavior
Example: Catching Built-in Exceptions
The try/finally Statement
Example: Coding Termination Actions with try/finally
Unified try/except/finally
Unified try Statement Syntax
Combining finally and except by Nesting
Unified try Example
The raise Statement
Raising Exceptions
Scopes and try except Variables
Propagating Exceptions with raise
The assert Statement
Example: Trapping Constraints (but Not Errors!)
with/as Context Managers
Basic Usage
The Context Management Protocol
Multiple Context Managers in 3.1, 2.7, and Later
Exception Objects
Exceptions: Back to the Future
String Exceptions Are Right Out!
Class-Based Exceptions
Coding Exceptions Classes
Why Exception Hierarchies?
Built-in Exception Classes
Built-in Exception Categories
Default Printing and State
Custom Print Displays
Custom Data and Behaviour
Providing Exception Details
Providing Exception Methods
File Handling
Mode of Operation

open() operation

read() operation

wirte() Operation

append() Operation

Creating file using write() mode

Data Science
numpy.py

pandas.py

Data Visualization
matplotlib.py

Database
MySQL

SQLite
Working with JSON and CSV file
Introduction of Django
Introduction of Tkinter

You might also like