0% found this document useful (0 votes)
5 views14 pages

Python

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views14 pages

Python

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON

Python
Introduction 1

Core Data Structure 2

Control Flow Statements 3

File Handling 4
Introduction
Python, created by Guido van Rossum .Python
is a high-level, general-purpose programming
language widely used in various applications
like web development, data science, machine
learning, and automation. It is known for its
simple and readable syntax, making it easy to
learn and write, particularly for beginners.
Popular for: web development, software
engineering, data science, machine
learning, artificial intelligence, automation,
and more.
Core Data Structures
Python offers several built-in data structures that
are essential for organizing and managing data
efficiently. Understanding their characteristics is
crucial for effective programming.
Lists
Dictionaries
Sets and Tuples
Lists
Ordered, mutable collections of items.
They are versatile and commonly used
for sequences where elements can be
added, removed, or changed.
Dictionaries
Unordered collections of key-
value pairs.
Perfect for fast lookups based on
a unique key, often used for data
mapping.
Sets & Tuples
Sets store unique, unordered items.
Tuples are ordered, immutable
sequences, often used for fixed
collections of related items.
Control Flow Statements
Control flow statements are
fundamental to programming,
allowing your programs to
make decisions and repeat
actions based on specific
conditions.
Conditional Statements
if: Executes a block of code if a condition
is true.
elif (else if): Checks additional conditions
if the preceding ones are false.
else: Executes a block of code if all
preceding conditions are false.

Looping Statements
for: Iterates over a sequence (like a list,
tuple, or string).
while: Repeats a block of code as long as
a condition is true.
break/continue: Keywords to exit a loop
early or skip to the next iteration.
OOP’s in Python
Class 1

Object 2

Inheritance 3
Class Objects
In Python, a class serves as a In Python, an object is a fundamental
blueprint or a template for creating concept representing a specific
objects. It is a fundamental concept instance of a class. It is a self-
in object-oriented programming contained entity that encapsulates
(OOP), which is a programming both data (attributes) and behavior
paradigm that structures code (methods).
around objects rather than
functions and logic.
Inheritance
Inheritance in Python is a fundamental
concept of Object-Oriented
Programming (OOP) that allows a new
class (called the child class, subclass, or
derived class) to inherit attributes and
methods from an existing class (called
the parent class, superclass, or base
class).
Thank You

You might also like