Python Basics
Defining a Function
def greet(name):
print(f"Hello, {name}!")Calling a Function
greet("Alice") # Output: Hello, Alice!Return Values
def add(a, b):
return a + b
result = add(3, 5)
print(result) # Output: 8Parameters and Arguments
Default Parameters
Keyword Arguments
Arbitrary Arguments
Object Oriented Design
Key Concepts of OOP
Benefits of OOP
Working with File
Opening and Closing Files
Using the with Statement
with StatementReading Files
Writing to Files
Appending to Files
Working with Binary Files
Handling File Exceptions
Using the os and pathlib Modules
os and pathlib ModulesLast updated