Python Training Outline
Duration: 32 Hours
Pre-Requisite:
• This course is for people who have worked on any operating system and an editor. The
learner should have explored programming concepts & would like to program using the
Python Scripting language.
Lab-Setup:
OPERATING SYSTEM: Windows 7/10 or Any Flavors of UNIX (Linux, HP-UX, Ubuntu, Solaris or
MAC OS). PYTHON Supports Multiplatform.
RAM: 8GB RAM
HARD DISK SPACE: 100GB
SOFTWARES:
NOTE: In Flavors of UNIX, Python v2 will be installed by default and the packages will be installed
during the training session.
a) Python v3.7 – http://www.python.org/downloads
b) Pycharm Community Edition
c) MySQL Database (If any other database is being used, this should be informed prior to the
training)
Course Content
PYTHON Introduction and Basics
❖ The Python Interpreter
❖ Working with Command Line/IDLE
❖ Python Data Types
❖ Built in Operators, Functions and Methods
❖ The ‘type()’ and ‘dir()’ functions
❖ Blocks and Indentation
❖ Scope of Variables
Conditional Statements and Iterators
❖ Simple ‘if’ and Simple ‘if … else’ statements
❖ Multilevel ‘if … elif … else’ statements
❖ Nested ‘if … else’ statements
❖ The ‘for’ Iterator
❖ The ‘while’ loops
❖ Loop Control Statements – break and continue
❖ The ‘pass’ statement
Collections
❖ Lists – Definition, Operations and Comprehension
❖ Tuples – Definition and Operations
❖ Dictionary – Definition, Operations and Comprehension
❖ Sets – Definitions and Operations
❖ Membership and Identity Operators
❖ Enumerations
Functions
❖ Defining the Function
❖ Function without Arguments
❖ Function with Fixed number of arguments
❖ Function with keyword arguments
❖ Function with Default arguments
❖ Function with variable length arguments
❖ Returning single/multiple values from the function
❖ Lambda Expressions
❖ Map, Filter and Reduce Functions
❖ Globals and Locals
File I/O
❖ Creating the File
❖ Writing the contents to the file
❖ Using ‘writelines()’ method
❖ Explicit reading with read(), readline() and readlines()
❖ Reading Binary Files
❖ Use of ‘with’ statement
Modules and Packages
❖ What are modules?
❖ Import user defined modules
❖ Priority in reading the modules from the directories
❖ Creating ‘.pyc’ file using ‘-m’ option
❖ Advantage of ‘.pyc’ file
❖ Pre-installed Modules
❖ Installing new Modules
❖ Python Repository
❖ Pip and Easy_install
❖ Creating and Accessing the Packages
Regular Expressions
❖ The ‘re’ module
❖ Patterns
❖ Anchors
❖ Range of Characters
❖ Quantifiers
❖ Metacharacters
❖ Character Class Escape Range Sequences
❖ Alternatives
❖ Choices
❖ Groupings
❖ Greedy Matches
Methods – search, match, findall, sub, split and compile
Classes and Objects
❖ Defining the Class
❖ The ‘__init__’ and ‘__str__’ methods
❖ Creating the Object
❖ The ‘self’ parameter
❖ Private and Public Attributes
❖ Concept of Encapsulation
❖ Concept of Polymorphism
❖ Concept of Inheritance
❖ Types of Inheritance – Single, Multiple, Multilevel and Hierarchial
❖ Magic Methods
❖ Method and Operator Overloading
Exception Handling
❖ Standard Exception Hierarchy
❖ Handling the Exceptions
❖ Generic Exceptions
❖ Handling Multiple Exceptions
❖ User Defined Exceptions
❖ Raise and Assertions
Relational Database Interaction
❖ Use of Database in Real Time
❖ Modules to access the databases in Python
❖ Installation of DB Module, preferably for MySQL
❖ Connecting to the database
❖ CRUD Operations
❖ Transaction Management
❖ Connection and Cursor Objects
❖ Use of Query String Parameters
CSV Modules
❖ CSV Format
❖ Creating the CSV Files
❖ Writing the contents into the CSV Files
❖ Reading the CSV File
❖ Reading the Contents of CSV File using DictReader
❖ Writing the Contents of CSV File using DictWriter
❖ Other Delimiters instead of ‘,’
Multithreaded Programming
❖ Why use threads?
❖ Threads are different
❖ Variables are shared
❖ Python threads modules