Python
Getting Started
Introduction
Hello World
>>> print("Hello, World!")
Hello, World!Variables
age = 18 # age is of type int
name = "John" # name is now of type str
print(name)Data Types
Slicing String
Lists
If Else
Loops
Functions
File Handling
Arithmetic
Plus-Equals
f-Strings (Python 3.6+)
Python Built-in Data Types
Strings
Numbers
Booleans
Lists
Tuple
Set
Dictionary
Casting
Python Advanced Data Types
Heaps
Stacks and Queues
Python Strings
Array-like
Looping
Slicing string
String Length
Multiple copies
Check String
Concatenates
Formatting
Input
Join
Endswith
Python F-Strings (Since Python 3.6+)
f-Strings usage
f-Strings Fill Align
f-Strings Type
F-Strings Others
F-Strings Sign
Python Lists
Defining
Generate
Append
List Slicing
Remove
Access
Concatenating
Sort & Reverse
Count
Repeating
Python Flow control
Basic
One line
else if
Python Loops
Basic
With index
While
Break
Continue
Range
With zip()
for/else
Python Functions
Basic
Return
Positional arguments
Keyword arguments
Returning multiple
Default Value
Anonymous functions
Python Modules
Import modules
From a module
Import all
Shorten module
Functions and attributes
Python File Handling
Read file
String
Object
Delete a File
Check and Delete
Delete Folder
Python Classes & Inheritance
Defining
Constructors
Method
Class Variables
Super() Function
repr() method
User-defined exceptions
Polymorphism
Overriding
Inheritance
Miscellaneous
Comments
Generators
Generator to list
Handle exceptions
Last updated