PythonWorld
Contents:
Python Intro
Data Types
Conditions
Loops
Functions
Modules and Packages
Classes and Objects
Basics of Concurrency vs Parallelism
Multithreading
Multiprocessing
Iterators & Generators
Decorators
Utilities
Examples
Interview Questions
Case Studies
Pygames
Socket Programing
Try Yourself
PythonWorld
»
Welcome to Saurabh’s World of Python!
View page source
Welcome to Saurabh’s World of Python!
¶
Contents:
Python Intro
1. Introduction
Word Python!!
2. Core of Python
3. Salient Features
4. Unique Features
Data Types
1. Number
2. Strings
3. Lists
4. Tuple
5. Dictionary
Conditions
1. if statement
2. if else statement
3. if elif else statement
4. Nested statements
Loops
1. while
2. for
The range() function
for with range function
Iterating by Sequence Index
Functions
Categories of Functions
Pass by Reference vs Pass by Value
Function Arguments
1. Required arguments
2. Keyword arguments
3. Default arguments
4. Variable-length arguments
Modules and Packages
1. Creating Modules
a) import
Step 1:
Step 2:
b) The from…import Statement
2. Creating Packages
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Classes and Objects
Creating Classes
Creating Instances
Accessing Attributes
Built-In Class Attributes
Class Inheritance
Multiple Inheritance:
Overriding Methods
Magic Methods
Overloading Operators
Basics of Concurrency vs Parallelism
A Cooking Example
When to use Threads versus Processes
Concurrency in Python
Python Global Interpreter Lock (GIL)
How To MultiProcess In Python?
Multithreading
Starting a New Thread
Threading Module
Creating Thread Using Threading Module
Synchronizing Threads
Multithreaded Priority Queue
Multiprocessing
CPU Heavy Computation with Multithreading
CPU Heavy Computation with Multiprocessing
Process Vs Pool Class
Iterators & Generators
Iterators
The Iteration Protocol
Generators
Generator Expressions
Example: Reading multiple files
Itertools
Decorators
1. Function as Variable
2. Nested Function Definition
3. Function as Parameter
4. Nested Return Functions
5. Scope of Inner Functions
6. Composition of Decorators
7. Anotation Formation
8. Decorator Syntax
9. Multiple Decorate
10. Decorator Flavour
Utilities
1. Lambda Function
2. Map Function
3. Reduce Function
4. Filter Functions
Examples
1. Palindrome
2. Even-Odd
3. Factorials
4. Prime Numbers
5. Fibonacci Sequence
6. Armstrong Number
7. Transpose a Matrix
Interview Questions
Descriptive
MCQ
Case Studies
1. Speeding Up API with Thread Pools
Normal API Request:
API Request Thread Pools:
Pygames
1. Introduction of Pygames
2. Adding images in Pygames
3. Moving images in Pygames
4. Adding Boundary to images in Pygames
5. Adding text in Pygames
6. Adding objects in Pygames
7. Crashing/Collision in Pygames
8. ScoreBoard in Pygames
9. Creating Start Menu
10. Add Sound and Music in Pygames
Socket Programing
1. A Simple Server
2. A Simple Client
Try Yourself
Indices and tables
¶
Index
Module Index
Search Page