Python - Complete - MSS - Google Docs
Python - Complete - MSS - Google Docs
*Python Topics:*
∙ ython definition, Introduction - Characteristics, Pros, Cons, Installation procedure.
P
∙ Data Types, Operators, Variables.
∙ Access Modifiers, Decision-Making concepts, Control statements, Modules
∙ Loops, Functions, File I/O, Exceptions
∙ Monkey patching, Decorators, Multiprocessing, Multi-threading, JSON package
explanation, and usage
∙ OOPS - Class, Object, Inheritance, Polymorphism, Encapsulation, Constructor,
Abstraction
∙ Pandas, Numpy, XML programming, Sockets, Sending email...
∙ Regular expressions and their types, Web scraping
∙ API frameworks - Flask, Django, FastAPI, Streamlit, Starlette
∙ Servers - Werkzeug, Uvicorn, Waitress, Gunicorn. Monitoring Tool - Supervisor
Python Introduction
ython is one of the most popular, widely used programming language general-purpose
P
interpreted,interactive,object-oriented,andhigh-levelprogramminglanguagethatfocuseson
codereadability.Pythonisadynamicallytypedandgarbage-collectedprogramminglanguage.a
Dutch Programmer Guido van Rossum created it during 1985- 1990 at the National Research
InstituteforMathematicsandComputerScienceintheNetherlands. .Becauseofitssimplersyntax,
extensive features and support of librariesitisusedmostly.Pythondoesnothaveanyrelationto
S nake.ThenameofthePythonprogramminglanguagewasinspiredbyaBritishComedyGroupMonty
Python a popular comedy series Monty Python's Flying Circuson BBC. .
ython is a general-purpose language - It is used in various areas of applications such as
p
Machine Learning, Artificial Intelligence, web development, IoT, and more.. Examples of
general-purpose languages include Python,Java,C++,andJavaScript.Unlike SQLfordatabase
querying(Domain specific langauage DSL)
ython is Interactive − Python comes with an interactive shellthatworksontheprincipleof
P
REPL(Read–Evaluate–Print–Loop). YoucanactuallysitataPythonpromptandinteract
with the interpreter directly to write your programs.
ython is Object-Oriented − Python supports Object-Oriented style or technique of
P
programming that encapsulates code within objects.
∙ pen the command prompt and type python there you can enter into python
o
interactive mode.
∙ You can type any valid Python expression and press Enter.
∙ The interactive mode is especially useful for getting familiar with a library and
testing out its functionality.
Features of Python
∙ ython is simple and Open Source which means it's available free of cost.
P
∙ Python is versatile and can be used to create many different things like web
development (server-side), software development, mathematics, and system scripting.
∙ PythonhaspowerfuldevelopmentlibrariesincludingAI,ML,etc,andextensivesupport
libraries(NumPy for numerical calculations, Pandas for data analytics, etc).
∙ Python has elegant syntax and dynamic typing.
∙ Python is platform-independent Cross-platform, which means it works on different
platforms (Windows, Mac, Linux, Raspberry Pi, etc).
∙ Known for its readability, which means code is easier to write, understand and
maintain.
∙ Dynamicallytypedlanguage(Noneedtomentiondatatypebasedonthevalueassigned,
it takes data type)
∙ Object-oriented and Procedural Programming language
∙ High-level language, Interpreted Language.
∙ In Python, Indentation is used to define blocks of code. It tells the Python
interpreterthatagroupofstatementsbelongstoaspecificblock.Allstatements
with the same level of indentation are considered part of the same block
∙ AutomaticMemoryManagement:Pythonoffersautomaticmemorymanagement,
which means developers do not require to allocate or deallocate memory
manually. The memory manager of Python handles object creation, memory
allocation, garbage collection, and memory optimization automatically.
Con's of Python
erformance: Python is an interpreted language, which means that it can be slower than
P
compiled languages like C or Java. This can be an issue for performance-intensive tasks.
emory consumption: Python can consume a lot of memory, especially when working with
M
large datasets or running complex algorithms.
ynamically typed: Python is a dynamically typed language, which means that the types of
D
variablescanchangeatruntime.Thiscanmakeitmoredifficulttocatcherrorsandcanleadto
bugs.
ackaging and versioning: Python has a large number of packages and libraries, which can
P
sometimes lead to versioning issues and package conflicts.
∙ pen the downloads folder and click on Python that you have installed on your PC.
O
∙ MakesuretomarkAddPython3.11toPATHotherwiseyouwillhavetodoitexplicitly.It
will start installing Python on Windows.
∙ Installation is complete
∙ Now go to Windows and type IDLE. This is Python Interpreter also called Python Shell.
✔
Written in C
✔ Generates .pyc
✔ Uses PVM
✔ Most stable, most libraries support it
✔ Slower than Java but reliable
🔶
2. PyPy(Fast Python – JIT Compiler)
✔
Written in RPython
✔ HasJust-In-Time (JIT) compiler
✔ Much faster than CPython in long-running programs
✔ Great for loops, heavy functions
❌ Not all libraries support it (especially C-extensions)
💭 PyPy is Python with a turbocharger.
🔶
3. Jython(Python on Java)
✔
Written in Java
✔ Runs on JVM
✔ Allows mixing Python + Java
✔ Can import Java libraries directly
❌ Slower development
❌ Not fully updated to latest Python versions
💭 Good when working with Java ecosystems.
🔶
4. IronPython(Python on .NET)
✔
Written in C#
✔ Runs on .NET CLR
✔ Can use C#, .NET libraries
❌ Limited community support
❌ Not the latest Python version
💭 Ideal for Microsoft/.NET environments.
🔶
5. Cython
✔
Not a full implementation
✔ Helps convert Python code → C forspeed
✔ Mostly used to optimize performance
✔ Used heavily in machine learning libraries (NumPy, Pandas internals)
💭 Cython is like giving Python a gym membership to get stronger.
ython is both a programming language a nd a scripting [Link] is a high-level,
P
general-purpose language, so we use it to build complete applications like APIs or data
pipelines.
tthesametime,Pythoncanalsobeusedasascriptinglanguageforautomation,quicktasks,
A
and running scripts without compilation.
irtualEnvironments:Pythonsupportsvirtualenvironments(venv)whichhelpsisolating
V
thedependenciesfordifferentprojects.Thisalsohelpspreventingpackageconflictsand
ensuring each project runs with the required library versions.
EP8:Python'sofficialstyleguidepromotesbestpracticessuchasmeaningfulvariable
P
names, consistent indentation, proper spacing, and a 79-character line limit for better
code readability and maintainability.
ip is the Python Package Installer. It is used to install,upgrade,andmanagePythonlibraries
p
from the Python Package Index (PyPI). Tools like [Link] and virtual environments
depend on pip for dependency management.
urpose
P ommand
C
Run a Python file python [Link]
Run with Python 3 python3 [Link]
Open Python shell python
Check Python version python --version
Run a module python -m module_name
Disassemble to view
python -m dis [Link]
bytecode
urpose
P ommand
C
Install a package pip install package_name
Install specific version pip install package==1.2.3
Upgrade a package pip install --upgrade package_name
Uninstall package pip uninstall package_name
List installed packages pip list
Show package details pip show package_name
Create requirements file pip freeze > [Link]
Install from requirements
pip install -r [Link]
file
urpose
P Command
Create virtual
python -m venv venv
environment
Activate venv (Windows) venv\Scripts\activate
ctivate venv
A
source venv/bin/activate
(Mac/Linux)
Deactivate venv deactivate
Difference Between Python and C++
The following table summarizes the differences between Python and C++
ython is an interpreted-based
P ++ is a compiler-based
C
programming language. Python programming language. C++
Execution
programs are interpreted by an programs are compiled by a
interpreter. compiler.
ython is a dynamic-typed
P
Typing C++ is a static-typed language.
language.
erformanc P
P ython's execution performance is ++ codes are faster than Python
C
e slower than C++'s. codes.
e assume that you have Python interpreter available in /usr/bin directory. Now,
W
try to run this program as follows −
• Variables
•
Identifiers
•
Keywords
•
Comments
•
Input from Users
Python Variables
ariables in Pythonare used to store data values. Unlike other languages, Python
V
variables do not require explicit declaration of type; they are dynamically typed. This
eans thatthetypeofvariableisdeterminedatruntimebasedonthevalueassignedto
m
it.
Output:
1. It can contain letters (A-Z, a-z), digits (0-9), and underscores (_).
2. It cannot start with a digit.
3. We cannot use Python keywords as identifiers.
4. Case-sensitive (MyVar and myvar are different identifiers).
5. It should be descriptive and follow naming conventions (e.g., using
snake_case for variables and functions and CamelCase for class names).
Python Keywords
eywordsarereservedwordsinPythonthatcannotbeusedasvariablenames.Examples
K
include if, else, while, for, def, class, import, etc. Python has35 keywords(Python 3.10+).
eyword
K Meaning / Use
False Boolean false value
True Boolean true value
one
N epresents null / no value
R
and Logical AND operator
or Logical OR operator
not Logical NOT operator
as Used to create alias (modules, exceptions)
Debugging check; raises error if condition
assert
fails
reak
b Exit loop immediately
continue Skip to next loop iteration
class Define a class
def Define a function or method
del Delete variable/object/item
elif Else-if condition
else Else condition block
except Catch an exception
finally Always executed after try–except
for Loop keyword
while Loop keyword
from Import specific module parts
import Import module
global Declare global variable inside function
nonlocal Access outer function variable
if Conditional statement
in Membership operator (value in sequence)
is Identity comparison (checks object identity)
lambda Create anonymous function
pass Placeholder; does nothing
r aise aise an exception manually
R
return Return a value from function
try Try block for exception handling
ith
w ontext manager (auto resource handling)
C
yield Return generator value
Python Comments
omments inPythonareusedtoexplaincodeandmakeitmore[Link]are
C
ignored by the Python interpreter, meaning they do not affect the execution of the
program.
❌
2.int("abc")→ Error
Reason
" abc" isnot numeric.
Python has no way to convert alphabets to an integer.
❌
3.float("abc")→ Error
Reason
float() expects numeric text:
• " 10"
• "10.5"
• "2e5"
ype
T
What It Expects (Works For) Not Possible (Fails For)
Cast
- Integer strings → "10" - Floats → 10.5 - Float strings → "10.5" -
int()
(converted to 10) - Boolean → True/False Non-numeric strings → "abc"
- Numeric strings → "10", "10.5" - ints →
float() - Non-numeric strings → "xyz"
10 - booleans → True, False
str() nything→ numbers, lists, tuples
A ✔ Never fails
Any object (empty → False, non-empty →
bool() ✔ Never fails
True)
list() Iterable objects → "abc", (1,2,3), [1,2] Non-iterables → 10, 10.5, True
tuple() Iterable objects → "hi", [1,2] Non-iterables → 10, 10.5
set() Iterable objects → "hello", [1,2,3] Non-iterables → 10, 10.5
Iterable ofkey-value pairs→ - Strings → "abc" - Non-pair lists →
dict()
[("a",1),("b",2)] [1,2,3] - Non-iterables → 10
One-Line Summary
• int() / float()→ needs numeric text
• list() / tuple() / set()→ needs iterable
• dict()→ needs iterable of 2-value items
• str() / bool()→ always works
Allows
Type Ordered? Mutable?
uplicates?
D
list ✔ Yes ✔ Yes ✔ Yes
tupl
e
✔ Yes ✔ Yes ❌ No
set ❌ No ❌
✔
Mutable (but elements must be
Unordered immutable)
eature
F List Tuple Set ictionary
D
yntax
S [ ] ( ) { } { key: value }
ythondoesNOThavetrueaccessmodifierslikeJavaorC++.Instead,itusesnaming
P
conventions.
1. Public
nything without underscores
A
Accessible from anywhere: inside class, outside class, subclass, modules.
2. Protected
Prefix with one underscore _
Used to indicate: “internal use – don’t access directly”
But still accessible—Python DOES NOT restrict it.
Protected variable can be accessed within the class and its subclasses.
3. Private(name-mangled)
Prefix withtwo underscores__
ython performsname mangling→ internally changesname to
P
_ClassName__variable.
This prevents accidental access
Private variables are only accessible within the class they are defined in.
_init__ is the constructor in [Link] runs automaticallyWhenever you create an
_
object:
obj = MyClass() Python automatically calls: MyClass.__init__(obj)
self representsthe current object (instance) calling the method.
he data types are used to define the type of a variable. It represents the type of
T
data we are going to store in a variable and determines what operations can be
done on it. Since Python is dynamically typed, the data type of a variable is
determined at runtime based on the assigned value.
MappingType: dict
Boolean: bool
🟩
1. Numeric Types
ython numbers represent data that has a numeric value. A numeric value can be an
P
integer, a floating number or even a complex number. These values are defined as int,
float and complex classes.
ype
T Description xample
E
int Whole numbers 10, -5, 1000
ecimal numbers,characters e E 1
D 0.5,
float
allowed positive or negative 3.14,10.5e4
omple Numbers with real + imaginary
c
3+4j
x parts
🟪
2. Sequence Types
ython Listsare the most versatile compound datatypes. A Python list contains
P
items separated by commas and enclosed within square brackets ([]). To some
extent, Python lists are similar to arrays in C. One difference between them is that
all the items belonging to a Python list can be of different data type where as C
array can store elements related to a particular data type.
ython tupleis another sequence data type that issimilar to a list. A Python tuple
P
consists of a number of values separated by commas. Unlike lists, however, tuples
are enclosed within parentheses (...).
◦ s in case of a list, an item in the tuple may also be a list, a tuple itself or
A
an object of any other Python class.
◦ o form a tuple, use of parentheses is optional. Data items separated by
T
comma without any enclosing symbols are treated as a tuple by default.
🟧
3. Set Types
set can store only immutableobjects such as number(int, float, complex or
A
bool), string or tuple. If you try to put a list or a dictionary in the set collection,
Python raises a TypeError.
🟦 4. Mapping Type
ython dictionary is like associative arrays or hashes found in Perl and consist
P
of key:valuepairs. The pairs are separated by commaand put inside curly
brackets {}. To establish mapping between key and value, the semicolon':' symbol
is put between the two.
ython booleantype is one of built-in data types which represents one of the two
P
values either Trueor False. Python bool()functionallows you to evaluate the
value of any expression and returns either True or False based on the
expression.
alue
V Meaning
True / Subclass of int (True=1,
False False=0)
Used in conditions, loops, comparisons.
🟫 6. None Type
.
🌟
Python Collections – Master Comparison Table
ata
D Mutable Allows
Ordered? Notes
Type ? Duplicates?
list ✔
Yes ✔ Yes ✔ Yes est for dynamic items
B
tuple ✔ Yes ❌ No ✔ Yes Faster than list; safe data
str ✔ Yes ❌ No ✔ Yes Immutable sequence of chars
dict
✔ Yes (Python
✔ Yes
✔ Values❌ Keys must be unique &
3.7+) Keys immutable
set ❌ No ❌
✔ Yes No Stores only unique elements
❌
frozenset No ❌ ❌
No No Immutable version of set
bytes ✔ Yes ❌ No ✔ Yes Immutable sequence of bytes
bytearray✔ Yes ✔ Yes ✔ Yes Mutable byte sequence
Python Operators
🔹
1. Arithmetic Operators
perator
O Meaning xample Result
E
+ Addition 10 + 5 15
- Subtraction 10 - 5 5
* ultiplication
M 0 * 5
1 0
5
/ Division (float) 10 / 4 2.5
// Floor division 10 // 4 2
Modulus
% 10 % 3 1
(remainder)
** Exponentiation 2 ** 3 8
🔹 2. Relational / Comparison Operators
ython Comparison operatorscompare the values oneither side of them and decide
P
the relation among them. They are also called Relational operators.
Exampl
Operator Meaning Output
e
=
= qual to
E 5 == 5 True
!= Not equal to 5 != 3 True
> Greater than 5 > 3 True
< Less than 3 < 5 True
Greater or
>= >= 5
5 True
equal
<= Less or equal 3 <= 5 True
🔹 3. Logical Operators
ython logical operatorsare used to combile two ormore conditions and check the
P
final result. There are following logical operators supported by Python language.
Assume variable a holds 10 and variable b holds 20 then
perator
O Meaning xample
E esult
R
and True if both are true True and False False
True if at least one is
or True or False True
true
not Negates result not True False
🔹
4. Assignment Operators
perator
O Meaning xample Equivalent to
E
= Assign x = 5 —
+= Add & assign x += 3 x = x + 3
ubtract &
S
-= x -= 2 x = x - 2
assign
ultiply &
M
*= x *= 2 x = x * 2
assign
/= Divide & assign x /= 2 = x / 2
x
//= Floor divide x //= 2 x = x // 2
%= Modulus x %= 3 x = x % 3
**= Power x **= 3 x = x ** 3
🔹
5. Bitwise Operators
Python Bitwise operatorworks on bits and performsbit by bit operation. These
operators are used to compare binary numbers.
Exampl Binary
Operator Meaning
e Result
& AND 5 & 3 1
` ` OR `5
^ XOR 5 ^ 3 6
~ NOT ~5 -6
<< Left shift 5 << 1 10
Right
>> 5 >> 1 2
shift
🔹
6. Membership Operators
Python's membership operatorstest for membershipin a sequence, such as strings,
lists, or tuples.
perator
O Meaning Example utput
O
in True if value present 3
in [1,2,3] True
True if value not
not in 4 not in [1,2,3] True
present
Control Structures
ontrol structures determine theflowof a Pythonprogram. They decidewhenandhow
C
blocks of code should execute.
calling a function
Types of functions
• Built-in Functions: Python standard functions thatcan be used anytime.
• User-defined Functions:Functions created by the users on the basis of
their requirements.
Function Arguments
Function
are the values or variables passed into a functionwhenitis
arguments
called. The behavior of a function often depends on the arguments passed to it.
Types of Function arguments
•
Positional or Required Arguments
•
Keyword Arguments
•
Default Arguments
•
Positional-only Arguments
•
Keyword-only arguments
•
Arbitrary or Variable-length Arguments
equiredargumentsaretheargumentspassedtoafunctionincorrectpositionalorder.
R
Here, the number of arguments in the function call should match exactly with the
function definition, otherwise the code gives a syntax error.
Keyword Arguments
Keyword
are related to the function calls. When you use keyword
arguments
rguments in a function call, the caller identifies theargumentsbytheparameter
a
name.
Default Arguments
A
default is anargumentthatassumesadefaultvalueifavalueisnot
argument
provided in the function call for that argument.
Positional-only arguments
Keyword-only arguments
ose arguments that must be specified by their namewhilecallingthefunctionis
h
known as Keyword-only arguments . Theyaredefinedbyplacinganasterisk("*")
in the function's parameter list before any keyword-only parameters. This type of
argumentcanonlybepassedtoafunctionasakeywordargument,notapositional
argument.
2.Mathematics Functions
Function urpose
P
Absolute
abs(x) non-negative
value
ound to n digits;
R
round(x, n) n<0 → left of
decimal
ow(x, y)
p same as x**y
sum(iterable) sum of items
min(iterable) smallest
max(iterable) largest
Returns
divmod(a, b) (quotient,
remainder)
in(x)
b convert to binary
oct(x) convert to octal
hex(x) convert to hex
Function urpose
P
len() length of iterable
sorted() returns sorted list
reversed() reverse iterator
numerate()
e r eturns index + value
range() generate sequence
zip() combine sequences
apply function to each
map(func, iterable)
item
filter(func, iterable) filter items
ll(iterable)
a rue if all items True
T
any(iterable) True if at least one True
4.Input / Output Functions
unction
F Purpose
print() isplay output
d
input() take input
string
format()
formatting
open() file handling
Function urpose
P
id(obj) memory address
type(obj) type of object
isinstance(obj, class) instance check
issubclass(A, B) subclass check
list
dir(obj)
attributes/methods
v ars(obj) object __dict__
getattr(obj, name) get attribute
setattr(obj, name, value) set attribute
hasattr(obj, name) check attribute
delattr(obj, name) delete attribute
unction
F urpose
P
callable(obj) check if callable
valuate string
e
eval(expr)
expression
xec(code)
e xecute Python code
e
globals() global symbol table
locals() local namespace
unction
F Purpose
help() pen Python help
o
escape non-ASCII
ascii()
characters
repr() string representation
ash()
h ash of object
h
object() base object
super() parent class helper
Function urpose
P
create class
classmethod()
method
create static
staticmethod()
method
property() create property
Using a Module
import mymodule
print([Link]("Bhavani"))
Built-in Modules
• math, random, datetime, os, sys, re (regex), json, csv
Example:
import math
print([Link](16)) # 4.0
2. Packages
A package is a collection of modules organized in directories.
Structure:
mypackage/
__init__.py
[Link]
[Link]
Using Packages
from mypackage import module1
[Link]()
try:
x = int(input("Enter a positive number: "))
if x < 0:
raise MyError("Negative number not allowed")
except MyError as e:
print(e)
ethod
M Description Example
ase Conversion
C
onverts string to
C
[Link]() "hello".upper() → 'HELLO'
uppercase
Converts string to
[Link]() "HELLO".lower() → 'hello'
lowercase
" hello world".capitalize() → 'Hello
[Link]() Capitalizes first letter
world'
apitalizes first letter
C
[Link]() " hello world".title() → 'Hello World'
of each word
Swaps uppercase ↔
[Link]() "HeLLo".swapcase() → 'hEllO'
lowercase
Whitespace Handling
emoves
R
[Link]() leading/trailing " hello ".strip() → 'hello'
spaces
Removes leading
[Link]() " hello".lstrip() → 'hello'
spaces
Removes trailing
[Link]() "hello ".rstrip() → 'hello'
spaces
Searching & Finding
eturns lowest index
R
[Link](sub) "hello".find("l") → 2
of substring or -1
Returns highest index
[Link](sub) "hello".rfind("l") → 3
of substring or -1
Like find(), raises
[Link](sub) ValueError if not "hello".index("e") → 1
found
ight-most index,
R
[Link](sub) raises ValueError if "hello".rindex("l") → 3
not found
Counts occurrences
[Link](sub) "hello".count("l") → 2
of substring
Checks if string starts
[Link](sub) "hello".startswith("he") → True
with substring
Checks if string ends
[Link](sub) "hello".endswith("lo") → True
with substring
odification /
M
Replacement
eplaces all
R
[Link](old, new) "hello".replace("l", "L") → 'heLLo'
occurrences
Concatenates iterable
[Link](iterable) with string as ",".join(["a","b"]) → 'a,b'
separator
Splits string into list
[Link](sep) "a,b,c".split(",") → ['a','b','c']
using separator
[Link](sep) Right split "a,b,c".rsplit(",", 1) → ['a,b','c']
"line1\nline2".splitlines() →
[Link]() Splits on line breaks
['line1','line2']
Splits into tuple: "hello world".partition(" ") →
[Link](sep)
before, sep, after ('hello',' ','world')
"hello world".rpartition(" ") →
[Link](sep) Right partition
('hello',' ','world')
Checking / Testing
rue if all characters
T
[Link]() "abc123".isalnum() → True
are alphanumeric
rue if all characters
T
[Link]() "abc".isalpha() → True
are letters
rue if all characters
T
[Link]() "123".isdigit() → True
are digits
rue if all characters
T
[Link]() "²³".isnumeric() → True
are numeric
rue if all characters
T
[Link]() " 123".isdecimal() → True
are decimal
True if all cased
[Link]() characters are "hello".islower() → True
lowercase
[Link]() True if all cased "HELLO".isupper() → True
c haracters are
uppercase
True if string contains
[Link]() " ".isspace() → True
only whitespace
True if string is in title
[Link]() "Hello World".istitle() → True
case
True if string is a valid
[Link]() "var1".isidentifier() → True
Python identifier
Formatting
enters string with fill
C
[Link](width, fillchar) "hi".center(6,"*") → '**hi**'
character
s [Link](width, fillchar) Left-justify " hi".ljust(6,"*") → 'hi****'
[Link](width, fillchar) Right-justify "hi".rjust(6,"*") → '****hi'
[Link](width) Pad with zeros "42".zfill(5) → '00042'
"Hello {}".format("World") → 'Hello
[Link]() String formatting
World'
s [Link]() / "abc".translate([Link]("a","x
Map characters
[Link]() ")) → 'xbc'
Encoding / Decoding
ncode string to
E
[Link](encoding) "hello".encode("utf-8") → b'hello'
bytes
Decode bytes to
[Link](encoding) b'hello'.decode("utf-8") → 'hello'
string
FLASK
lask is a lightweight and powerful web framework for Python. It’s often called a
F
"micro-framework" because it provides the essentials for web development without
unnecessary complexity. Unlike Django, which comes with built-in features like
authentication and an admin panel, Flask keeps things minimal and lets us add only
what we [Link] was developed by Armin Ronacher. Flask Python is based on the
WSGI(Web Server Gateway Interface) toolkit andJinja2template engine.
Advantages of Flask
• lask is a lightweight backend framework with minimal dependencies.
F
• Flask is easy to learn because its simple and intuitive API makes it easy to learn
nd use for beginners.
a
• Flask is a flexible Framework because it allows you to customize and extend the
framework to suit your needs easily.
• Flask can be used with any database like:- SQL and NoSQL and with any
Frontend Technology such as React or Angular.
• Flask is great for small to medium projects that do not require the complexity of a
large framework.
if __name__=='__main__':
[Link](debug=True)