Python Programming Introduction

Python Introduction

Python is a high-level, interpreted programming language known for its simplicity and readability. It was created by Guido van Rossum and first released in 1991. Python is widely used for web development, data analysis, artificial intelligence, scientific computing, and more.

Where we will use python in our real life:

Python is used in various real-life applications due to its versatility and ease of use. Here are some common areas where Python is applied:
Web Development:
Frameworks:
Django and Flask are popular Python frameworks for building web applications.
Example:
Websites like Instagram and Pinterest use Python to handle web server operations and manage data
Automation and Scripting:
Usage:
Python scripts automate repetitive tasks like file management, web scraping, and system administration.
Example:
Automating data entry tasks or managing server configurations.
Game Development:
Libraries:
Py game for creating games.
Example:
Python is used for developing simple 2D games or for prototyping game ideas.
Machine Learning and AI:
Libraries: TensorFlow, Keras, and Scikit-learn are used for building machine learning models.
Example:
Python is used to develop algorithms that can predict stock prices, recognize images, and understand natural language.
Data Analysis and Visualization:
Libraries:
Pandas for data manipulation, Matplotlib and Seaborn for plotting graphs.
Example:
Data scientists use Python to analyze large datasets and create visualizations to interpret trends.

History of python:

Python has a rich history that reflects its evolution into one of the most popular programming languages today:

  1. Early Development (1980s):
  • 1980: Guido van Rossum, a Dutch programmer, began working on Python as a successor to the ABC language, which he had previously worked on at Centrum Wiskunde & Informatica (CWI) in the Netherlands.
  • December 1989: Van Rossum started implementing Python during the Christmas holidays, focusing on simplicity and readability.
  1. Python 1.0 (1994):
  • January 1994: Python 1.0 was officially released. It introduced core features such as exceptions, functions, and the core data types (lists, dictionaries, and strings).
  1. Python 2.0 (2000):
  • October 2000: Python 2.0 was released, adding features like list comprehensions, garbage collection, and Unicode support. Python 2.x versions were widely used for over a decade.
  1. Python 3.0 (2008):
  • December 2008: Python 3.0 (also known as “Python 3000” or “Py3k”) was released. This version was not backward-compatible with Python 2.x but introduced many improvements and new features, such as:
    • A new print function (print()) replacing the print statement.
    • Improved handling of strings and Unicode.
    • A more consistent and simplified syntax.
  • Python 3.x aimed to rectify design flaws and streamline the language.
  1. Ongoing Development (2010s – Present):
  • Python 3.x has continued to evolve with regular updates introducing new features, optimizations, and enhancements. Notable releases include:
    • Python 3.5 (2015): Introduced async/await syntax for asynchronous programming.
    • Python 3.6 (2016): Added formatted string literals (f-strings) and variable type annotations.
    • Python 3.7 (2018): Improved performance and introduced data classes.
    • Python 3.8 (2019): Added the walrus operator (:=) for assignment expressions.
    • Python 3.9 (2020): Introduced new syntax features and improvements to the standard library.
  • Python 3.10 (2021): Enhanced error messages and pattern matching.

Python’s development continues with a focus on enhancing performance, ease of use, and expanding its ecosystem. Its evolution reflects its adaptability and the active involvement of its global community.

Python features:

Python is known for several key features that contribute to its popularity and versatility:
1.Readable and Simple Syntax:
Python’s syntax is designed to be clean and easy to understand, which enhances code readability and reduces the complexity of programming.
2.Interpreted Language:
Python is executed line-by-line by an interpreter, which helps in debugging and testing code in a more interactive manner.
4.Dynamic Typing:
In Python, you don’t need to declare the type of a variable explicitly. Types are inferred at runtime, which can simplify code writing and enhance flexibility.
5.High-Level Data Structures:
Python includes built-in data structures like lists, tuples, sets, and dictionaries, which make data manipulation and storage straightforward.
6.Extensive Standard Library:
Python comes with a comprehensive standard library that provides modules and functions for various tasks, such as file I/O, system calls, and data manipulation.
7.Object-Oriented and Functional Programming:
Python supports multiple programming paradigms, including object-oriented programming (OOP) and functional programming. This flexibility allows developers to choose the approach best suited to their problem.
8.Cross-Platform Compatibility:
Python is available on various platforms, including Windows, macOS, and Linux. Code written in Python can often run on different operating systems with minimal modification.
9.Extensible and Embeddable:
Python can be extended with modules written in C or C++, and it can be embedded into other applications to provide scripting capabilities.
10.Large Community and Ecosystem:
python has a vibrant and active community that contributes to a vast ecosystem of third-party libraries and frameworks. This makes it easier to find resources and support for various projects.
11.Ease of Integration:
Python can easily interface with other languages and technologies. It supports integration with databases, web services, and other systems.
12.Interactive Mode:
Python provides an interactive shell where you can test code snippets and debug your code interactively, which is useful for learning and experimentation.
13.Automatic Memory Management:
Python handles memory allocation and garbage collection automatically, reducing the need for manual memory management and minimizing memory leaks.

These features collectively make Python a powerful, flexible, and user-friendly language, suitable for a wide range of applications from web development to scientific computing.

Applications of python:

1.Web Development:
Frameworks:
Django, Flask, Pyramid.
Applications:
Websites like Instagram, Pinterest, and Spotify use Python for backend development and server management.
2.Smartphones:
Usage:
Python can be used to develop applications for smartphones, such as using frameworks like Kivy or Bee Ware to build cross-platform mobile apps.
Example:
A weather app that retrieves and displays weather data based on the user’s location.
3.Home Automation:
Usage:
Python can control smart home devices through libraries and frameworks that interact with home automation systems.
Example:
Writing scripts to control smart lights, thermostats, and security cameras via platforms like Home Assistant.
4.Robots:
Usage:
Python is used in robotics for controlling robots and processing sensor data.
Example:
Programming a robotic vacuum to navigate around a room or a robotic arm for picking up and moving objects.
5.Cars:
Usage:
Python is used in automotive applications for diagnostics, telemetry, and automation.
Example:
Developing a Python script to analyze vehicle data from an OBD-II diagnostic tool to monitor engine performance.
6.Data Analysis and Visualization:
Libraries:
Pandas, NumPy, Matplotlib, Seaborn.
Applications:
Python is used for analyzing large datasets, performing statistical analysis, and visualizing data trends in fields like finance, healthcare, and marketing.
7.Machine Learning and Artificial Intelligence:
Libraries:
TensorFlow, Keras, Scikit-learn, PyTorch.
Applications:
Python is employed in developing predictive models, natural language processing, computer vision, and recommendation systems.
8.Automation and Scripting:
Usage:
Writing scripts to automate repetitive tasks, manage files, or scrape web data.
Applications:
Automated reporting, data extraction, and system administration tasks.
9.Game Development:
Libraries:
Pygame, Panda3D.
Applications:
Python is used for developing simple 2D games, prototyping game concepts, and educational games.

Process of Running script:
Running a Python script involves several steps, from writing the script to executing it on your system. Here’s a general process:

  1. Write the Script:
  • Create a Python File: Use a text editor or an Integrated Development Environment (IDE) like PyCharm, VS Code, or even a basic editor like Notepad to write your Python code. Save the file with a .py extension. For example, script.py. python script.py print(“Hello, World!”)
  1. Install Python:
  • Download and Install: If you don’t have Python installed, download it from the official Python website and follow the installation instructions. Ensure you check the option to add Python to your system PATH during installation.
  1. Open a Command Line Interface (CLI):
  • Windows: Open Command Prompt or PowerShell.
  • macOS/Linux: Open Terminal.
  1. Navigate to the Script’s Directory:
  • Use the cd command to change to the directory where your Python script is located. For example: sh
    cd path/to/your/script
  1. Run the Script:
  • Execute the script by typing python (or python3 on some systems) followed by the script’s filename. For example: sh
    python script.py or sh
    python3 script.py This command tells the Python interpreter to run the script.
  1. View the Output:
  • The output of your script will be displayed in the CLI. For example, running the above script.py will print Hello, World! to the screen.
  1. Debug and Modify:
  • If there are errors, review the error messages, debug your script as needed, and rerun it. Modify the script in your text editor and save changes before running it again.
  1. Additional Considerations:
  • Virtual Environments: For managing dependencies, you might use virtual environments. Activate the environment before running the script.
  • Permissions: On some systems, you might need execute permissions. You can set this with chmod +x script.py on macOS/Linux.

By following these steps, you can effectively write, execute, and manage Python scripts on your system.

Python Keywords and Identifiers

In every programming language, there are specific words and rules that give structure and meaning to code. Python is no exception. It has a set of predefined words known as Keywords, which are reserved for defining the language’s syntax. These keywords cannot be used as names for variables, functions, or classes. Together with Identifiers, these keywords help form meaningful statements and expressions in Python.

Keywords :

Python Keywords are reserved words that hold special significance and dictate the syntax of the language. They cannot be used as names for identifiers, functions, or variables. Python keywords are primarily in lowercase, with the exception of True and False. As of Python 3.11, there are 35 reserved keywords.

Identifiers:

An Identifier is a user-defined name assigned to various entities such as variables, functions, classes, and modules. Identifiers can be a mix of letters, digits, and underscores. They are case-sensitive, meaning num, Num, and NUM would be treated as distinct identifiers in Python. To enhance code clarity, it’s good practice to use descriptive names for identifiers.
You can use the isidentifier() method to check if a string is a valid identifier.

Rules for Naming Python Identifiers:

  1. Cannot Be a Keyword: Identifiers must not be Python reserved keywords.
  2. No White Spaces: Identifiers should not include any white spaces.
  3. Allowed Characters: They can include letters (A-Z, a-z), digits (0-9), and underscores (_).
  4. Starting Character: They must start with a letter or an underscore (_).
  5. No Special Characters: Identifiers cannot contain special characters other than the underscore (_).

Variables:

In Python, a variable acts as a container that holds values. Python is dynamically typed, meaning you don’t need to declare the type of a variable or declare it before use. A variable is created as soon as you assign a value to it, and it essentially represents a name for a memory location where the value is stored. Variables are the fundamental units of storage in a program.
Example of a Variable in Python A variable in Python
serves as a reference to an object. Once you assign a value to a variable, you can use the variable name to refer to that value. In simpler terms, a variable is like a container that stores information.

Example:

Assigning a value to a variable
var = “bhanu
Printing the value stored in the variable
print(var)
In this example:
We store the string “bhanu” in the variable var. When we use print(var), the content of var, which is “bhanu”, gets printed.

Data types:

A data type defines the kind of value that a variable can hold and what operations can be performed on it. In programming, data types are crucial for defining the behavior of data and ensuring that operations are performed correctly. Each data type dictates the format, the amount of space it occupies, and the set of operations that can be applied

Various data types:
1.None
2.Numeric data type
3.String data type
4.Datetime data type

1.None Data Type
Description:
The unsigned values are called as none types values
None is a special constant in Python that represents the absence of a value or a null value. It is the sole value of the None Type data type.

Numeric Data Types Description:
Numeric data types in Python represent numbers and include integers, floating-point numbers, and complex numbers.
Types:
Integer (int):
Description: Represents whole numbers without decimal points.
Range:
The range of integers is limited by the amount of memory available, rather than a fixed range.
Example:
10, -3, 0
Float (float):
Description: Represents numbers with decimal points.
Precision:
Floats are implemented using double-precision (64-bit) IEEE 754 representation, which offers a precision of about 15-17 decimal digits.
Example:
3.14, -0.001, 2.71828
Complex(complex):
Description:
Represents complex numbers, which consist of a real part and an imaginary part.
Syntax:
The imaginary part is denoted by j.
Example:
2 + 3j, -1-4j
Operations:
Arithmetic:
Addition, subtraction, multiplication, division, etc.
Conversion:
Convert between types using functions like int(), float(), and complex().
Example:
a = 10 # Integer
b = 3.14 # Float
c = 2 + 3j # Complex
print(type(a)) #
print(type(b)) #
print(type(c)) #

String Data Type:

The str data type represents sequences of characters enclosed in quotes. Strings are immutable in Python, meaning their content cannot be changed after they are created.
Characteristics:
Quoting:
Strings can be enclosed in single quotes (‘…’), double quotes (“…”), or triple quotes (”’…”’ or “””…”””) for multi-line strings.
Immutability:
Strings cannot be modified in place; operations on strings result in new string objects.
Example:
s = “Hello,bhanu”
print(type(s)) #
print(s.upper()) # ‘HELLO, BHANU!’
print(s[0:5]) # ‘Hello’
print(s.replace(‘World’, ‘Python’)) # ‘Hello, bhanu!’

Datetime Data Type:

The datetime data type is part of the datetime module and provides classes for manipulating dates and times. It includes classes such as datetime, date, time, and timedelta.

Classes:

datetime.date:
Represents a calendar date (year, month, and day).
Example:
datetime.date(2024, 7, 25)datetime.
time:
Represents a time of day (hour, minute, second, microsecond).
Example:
datetime.time(14, 30, 45)
datetime.datetime:
Represents a combination of date and time.
Example: datetime.datetime(2024, 7, 25, 14, 30, 45)
datetime.timedelta:
Represents the difference between two dates or times.
Example: datetime.timedelta(days=7)

Operations:

Current Date/Time:
Get current date and time usingdatetime.datetime.now().Formatting: Format dates and times using strftime() and parse them using strptime().
Arithmetic: Perform arithmetic operations with timedelta.
Example:
from datetime import datetime, date, time, timedelta
Current date and time
now = datetime.now()
print(now) # e.g., 2024-07-25 14:30:45.123456
Creating a specific date and time
specific_date = date(2024, 7, 25)
specific_time = time(14, 30, 45)
specific_datetime = datetime(2024, 7, 25, 14, 30, 45)
print(specific_date) # 2024-07-25
print(specific_time) # 14:30:45
print(specific_datetime) # 2024-07-25 14:30:45
Date and time arithmetic
future_date = specific_date + timedelta(days=10)
print(future_date) # 2024-08-04

What is variable:

A variable in programming is a symbolic name associated with a value or an object. It acts as a container for storing data that can be referenced and manipulated throughout your code. The value stored in a variable can change over time, hence the term “variable.”

Declaration and Initialization:
In Python, variables are not explicitly declared with a type before they are used. Instead, you create a variable by simply assigning a value to it. Python determines the type of the variable based on the value assigned.
Example:
Declaration and initialization
variable_name = value;
variable_name is the name you choose for your variable.value is the data you assign to the variable.

Initialization:
Initialization refers to the process of assigning a value to a variable for the first time. When you initialize a variable, you are both declaring it and assigning it a value in a single step.
Examples of Variable Initialization:
Integer Initialization:
age = 25 # Initializes ‘age’ with an integer value
Float Initialization:
height = 5.9 # Initializes ‘height’ with a float value
String Initialization:
name = “Alice” # Initializes ‘name’ with a string value
List Initialization:
numbers = [1, 2, 3, 4, 5] # Initializes ‘numbers’ with a list

Reassigning Variables:
Variables in Python are mutable, meaning their values can be changed after they are initialized. Reassignment involves assigning a new value to an already initialized variable.
Example:
# Initial assignment
count = 10
#Reassigning a new value
count = 15
In this example, the variable count initially holds the value 10, but after reassignment, it holds the new value 15.
Summary:
Declaration:
In Python, you do not need a separate declaration step. Simply assign a value to create a variable.
Initialization:
This is the process of assigning an initial value to a variable, which happens at the time of creation.

Input and Output Statements:

Input Statements:
input() Function:
The input() function is used to take input from the user. It reads a line from the user and returns it as a string.
Syntax:
user_input = input(“enter age “)
example:
#Prompt the user for their name
name = input(“Enter your name: “)
#Display the input
print(“Hello, ” + name + “!”)
note:
The value returned by input() is always a string. To work with other data types (e.g., integers or floats), you need to convert the input using functions like int() or float().

Output Statements:

print() Function:
The print() function is used to output data to the console. It can handle multiple arguments and automatically adds spaces between them.
Syntax:
print(value1, value2, …, sep=’ ‘, end=’\n’)
here:
value1, value2, …: Values to be printed. sep (optional): Separator between values (default is a space). end (optional): String appended after the last value (default is a newline).
example:
# Print a single value print(“Hello, World!”)
# Print multiple values print(“The result is”, 42)
# Customize separator and end print(“Python”, “is”, “fun”, sep=’-‘, end=’!\n’)
summary:
Input: Use the input() function to receive data from the user. Convert the input to the appropriate data type as needed.
Output: Use the print() function to display data. You can customize the output using separators, end characters, and formatted strings.

Comments lines:

Comments in Python are used to explain and understand the code, making it more understandable for humans. They are not executed by the Python interpreter and have no effect on the code’s behavior. Comments help in documenting code, explaining complex logic, and making the codebase easier to maintain.
Types of Comments in Python:
1.Single-Line Comments:
2.multi-line comments:
1.Single-Line Comments:
Single-line comments are used for brief explanations or notes and start with the # symbol. Everything following the # on that line is considered a comment.
Syntax:
#This is a single-line comment
Example:
# Calculate the sum of two numbers
a = 10
# This is the first number
b = 20
# This is the second number
result = a + b
# Add the numbers
print(result) # Output the result

2.Multi-Line Comments:
Python does not have a specific syntax for multi-line comments, but you can use multiple single-line comments or triple-quoted strings to achieve the same effect.
Using Multiple Single-Line Comments:
#This is a multi-line comment
#that spans several lines.
#Each line starts with a hash symbol.

Using Triple Quotes:
Triple quotes (”’ or “””) can be used for multi-line strings, which can also serve as comments if they are not assigned to a variable or used as a docstring. This is less common but can be useful for longer explanations.
syntax:
“””
This is a multi-line comment.
It can span multiple lines.
“””

example:
“””
This script calculates the area of a rectangle.
The area is computed as width multiplied by height.
“””

width = 5
height = 10
area = width * height
print(“Area:”, area)
Summary:
Single-Line Comments:
Use # for brief, single-line notes.
Multi-Line Comments:
Use multiple # or triple-quoted strings for longer explanations.
Best Practices:
Write clear, concise, and relevant comments that enhance code readability and maintainability.

Operator:
An operator in programming is a symbol or function that performs operations on variables and values. Operators are used to manipulate data and variables, and they form the core of expressions and calculations in code. Python provides a wide range of operators to handle various types of operations.
Types of operator
1.Arithmetic operators
2.Relational operators
3.Logical operators
4.Membership operators
5.Identity operators

Arithmetic Operators:
Addition (+): Adds two numbers.
result = 5 + 3 # 8
This adds 5 and 3 to produce 8.
Subtraction (-): Subtracts the second number from the first.
result = 5 – 3 # 2
This subtracts 3 from 5 to produce 2
Multiplication (*): Multiplies two numbers.
result = 5 * 3 # 15
This multiplies 5 and 3 to get 15.
Division (/): Divides the first number by the second (returns a float).
result = 5 / 2 # 2.5
This divides 5 by 2 to get 2.5.
Floor Division (//): Divides the first number by the second and returns the integer part.
result = 5 // 2 # 2
This divides 5 by 2 and discards the fractional part to get 2.
Modulus (%): Returns the remainder of the division.
result = 5 % 2 # 1
This divides 5 by 2 and returns the remainder 1.
Exponentiation (**): Raises the first number to the power of the second.
result = 2 ** 3 # 8
This calculates 2 raised to the power of 3, which is 8.

  1. Comparison Operators:
    Comparison operators are used to compare values and return boolean results.
    Equal to (==): Checks if two values are equal.
    result = (5 == 5) # True
    This checks if 5 is equal to 5, which is True.
    Not equal to (!=): Checks if two values are not equal.
    result = (5 != 3) # True
    This checks if 5 is not equal to 3, which is True.
    Greater than (>): Checks if the first value is greater than the second.
    result = (5 > 3) # True
    This checks if 5 is greater than 3, which is True.
    Less than (<): Checks if the first value is less than the second.
    result = (5 < 3) # False This checks if 5 is less than 3, which is False.
    Greater than or equal to (>=): Checks if the first value is greater than or equal to the second.
    result = (5 >= 5) # True
    This checks if 5 is greater than or equal to 5, which is True.
    Less than or equal to (<=): Checks if the first value is less than or equal to the second.
    result = (5 <= 5) # True
    This checks if 5 is less than or equal to 5, which is True.
  2. Logical Operators:
    Logical operators are used to perform logical operations on boolean values.
    And (and): Returns True if both operands are True.
    result = (True and False) # False
    This checks if both True and False are True, which is False.
    Or (or): Returns True if at least one of the operands is True.
    result = (True or False) # True
    This checks if at least one of True or False is True, which is True.
    Not (not): Returns True if the operand is False, and False if the operand is True
    result = not True # False
    This negates True, resulting in False.
  3. .Assignment Operators:
    Assignment operators are used to assign values to variables and can also perform operations and assign the result.
    Assign (=): Assigns a value to a variable.
    x = 5 #This assigns 5 to x.
    Add and assign (+=): Adds a value to a variable and assigns the result.
    x += 3 # Equivalent to x = x + 3 #This increments x by 3.
    Subtract and assign (-=): Subtracts a value from a variable and assigns the result.
    x -= 2 # Equivalent to x = x – 2
    This decrements x by 2.
    Multiply and assign (*=): Multiplies a variable by a value and assigns the result.
    x *= 4 # Equivalent to x = x * 4
    This multiplies x by 4.
    Divide and assign (/=):Divides a variable by a value and assigns the result.
    x /= 2 # Equivalent to x = x / 2
    This divides x by 2.Modulus and assign (%=): Applies modulus and assigns the result.
    x %= 3 # Equivalent to x = x % 3
    This sets x to the remainder of x divided by 3.

5.Bitwise operator:

Bitwise operators perform operations on binary representations of integers.
And (&): Performs a bitwise AND operation.
result = 5 & 3 # 1
This performs a bitwise AND between 5 (0101 in binary) and 3 (0011 in binary), resulting in 1 (0001 in binary).
Or (|): Performs a bitwise OR operation.
result = 5 | 3 # 7
This performs a bitwise OR between 5 (0101) and 3 (0011), resulting in 7 (0111).
XOR (^):
Performs a bitwise XOR operation.
result = 5 ^ 3 # 6
This performs a bitwise XOR between 5 (0101) and 3 (0011), resulting in 6 (0110).
Complement (~): Performs a bitwise NOT operation.
result = ~5 # -6
This inverts all bits of 5 (0101) resulting in -6 (in Python’s signed integer representation).
Left shift (<<): Shifts bits to the left.
result = 5 << 1 # 10 This shifts 5 (0101) one bit to the left, resulting in 10 (1010). Right shift (>>): Shifts bits to the right.
result = 5 >> 1 # 2
This shifts 5 (0101) one bit to the right, resulting in 2 (0010).

6.Membership:

Operators Membership operators are used to test if a value is a member of a sequence (e.g., list, tuple, string).
In (in): Checks if a value exists within a sequence.
result = ‘a’ in ‘apple’ # True
This checks if ‘a’ is in the string ‘apple’.
Not in (not in): Checks if a value does not exist within a sequence.
result = ‘b’ not in ‘apple’ # True
This checks if ‘b’ is not in the string ‘apple’.

7.Identity:

Operators Identity operators are used to compare the memory locations of two objects.
Is (is): Checks if two variables point to the same object.
result = (x is y) # True if x and y refer to the same object
This checks if x and y are the same object in memory.
Is not (is not): Checks if two variables point to different objects.
result = (x is not y) # True if x and y are different objects
This checks if x and y are different objects in memory.

Summary:
Operators in Python are essential for performing operations on data and variables. They enable arithmetic calculations, logical reasoning, comparisons, and bitwise

Functions in Python:

A function in Python is a reusable block of code designed to perform a specific task. Functions help in organizing code into modular pieces, making it more readable, maintainable, and manageable. They also help avoid redundancy by allowing you to write a piece of code once and use it multiple times.

types of functions :

  1. Built-in Functions:
    Built-in functions are provided by Python and can be used directly without any import. They cover a wide range of functionalities such as type conversions, mathematical operations, and data manipulations.
    Examples:
    print(): Outputs data to the console.
    print(“Hello, bhanu”)
    len(): Returns the length of an object.
    length = len(“bhanu”) # 5
    type(): Returns the type of an object.
    data_type = type(42) #
  2. User-Defined Functions:
    User-defined functions are created by users to perform specific tasks. They are defined using the def keyword.
    Example:
    def greet(name):
    return f”Hello, {name}!”
    message = greet(“bhanu”)
    print(message)
    # Output: Hello, bhanu!
  3. Lambda Functions:
    Lambda functions are anonymous functions defined with the lambda keyword. They are typically used for short, throwaway functions where a full function definition is not necessary.
    syntax:
    lambda arguments: expression
    example:
    add = lambda x, y: x + y
    print(add(2, 3)) # Output: 5
    Summary:
    Built-in Functions: Predefined functions available in Python.
    User-Defined Functions: Functions created by users using def.
    Lambda Functions: Anonymous functions created with the lambda keyword.
    Recursive Functions: Functions that call themselves.
Python Programming Introduction

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top