SlideShare a Scribd company logo
1 of 18
Download to read offline
Rewa Engineering
College
Rewa (M.P.)
Internship on Python Programming language
Session 2023-24
Submitted by
Prakash tiwari
0301EC211036
Submitted To
Prof. A. K. Singh
Agenda
• Brief History of python
• What is python
• Why python
• Comments
• Variables and data types
• Typecasting in python
• Loops in python
• Functions in python
• Lists in python
• Tuples in python
Brief History of
Python
• Invented in the Netherlands, early 90s by Guido van Rossum
• Named after Monty Python
• Open sourced from the beginning
• Considered a scripting language, but is much more
• Scalable, object oriented and functional from the beginning
• Used by Google from the beginning
• Increasingly popular
What Is Python?
• Python is dynamically typed, General Purpose Language that
supports an object oriented programming as well as a functional
programming approach
• Python is an interpreted and a high level language, It is easy to
learn and it has efficient high level data structure
• Python comes with a large library of standard modules
Comments
A Comment is the part of coding file that programmer does not want
to execute, rather the programmer uses it to either explain the block
of the code or to avoid the execution of a specific part of code while
testing.
Single line comment
To write a comment just add ‘#’ at the start of the line
Example: # this is a single line comment
Print(“this is a print statement”)
Output: this is a print statement
Multiline comments
• To write a multi line comments we can use # at starting of each line
or we can use the multiline string
• Example:
“““This is an if-else statement.
it will execute a block of code if a specified condition is true.
if the condition is false then it will execute another block of
code. ”””
Variables and Data types
• Variables: Variable is like a container that holds data. Very similar to how our
containers in kitchen holds sugar, salt etc. creating a variable Is like creating a
placeholder in memory and assigning it some value.
for example
a=5678
print(a)
b=“Akash”
print(b)
Output : 5678
Akash
So here a and b are variables and 5678 and Akash are data types
Typecasting in python
The conversion of one data type into the other data type is known as
typecasting in python or type conversion in python.
Python supports a wide variety of functions or methods like: int(),
float(), str(), ord(), hex() , oct(), tuple(), set(), list(), dict(), etc. for type
casting in python.
Two types of typecasting
1. Explicit typecasting
2. Implicit typecasting
1. Explicit typecasting
The conversion of one datatype into another datatype, done via developer or
programmer’s intervention or manually as per the requirement , is known as
explicit typecasting.
Example: a=“1”
b=“2”
print(int(a) +int(b)) Output : 3
2. Implicit typecasting
According to the level, one data type is converted into other by the python
interpreter itself (automatically) . This is called implicit typecasting.
Example
c=1.9
d=8
Print(c+d) output: 9.9
Loops in python
• Sometimes a programmer wants to execute a group of statements a number of times. This can
be done using loops. Based on this loops are further classified into following types; for loop,
while loop.
For loop
For loop can iterate over a sequence of iterable object in python. Iterating over a sequence is
nothing but iterating over string, list,tuple , sets, dictionaries.
Colors=[“Red”, “Green”, “Blue”, “Yellow”]
for color in colors
Print(color)
Output: Red
Green
Blue
Yellow
While loop
As the name suggest, while loop execute statements while the condition is true.
As soon as the condition becomes false, the interpreter comes out of the while
loop.
Example: count=5
while( count > 0 )
print(count)
count= count-1
Output=5
4
3
2
1
Functions in python
• A function is a block of code that performs a specific task whenever it is
called. In bigger programs where we have large amounts of code , it is
advisable to create or use existing functions that make the program flow
organized and neat.
• There are two types of functions
1. Built-in functions
2.User-defined functions
Built-in functions
These functions are defined and pre-coded in python. Some examples of
built-in functions are as follows:
min(), max(), len(), sum(), type(), range(), dict() , list(), touple(), set(), print()
etc.
• User-defined functions
• We can create functions to perform specific tasks as per our needs. Such
functions are called as user defined functions
• Syntax
def function_name (Parameter) :
pass
• Example:
def calculateAmean( a, b)
mean=(a+b) /2
print(mean)
Lists in python
• Lists are ordered collections of data items.
• They stores multiple items in a single variable.
• List items are separated by commas and enclosed within square brackets.
• List are changeable meaning we can alter them after creation.
Example:
list1=[1, 2,3,4,5,6]
list2=[“Red”, “Green”, “blue”]
print(list1)
print(list2) outputs-[1, 2,3,4,5,6]
[“Red”, “Green”, “blue”]
Tuple in Python
• Tuples are ordered collection of objects. They store multiple items in
a single variable. Tuple items are seperated by commas and enclosed
within round brackets() . Tuples are unchangeable meaning we
cannot alter them after creation.
• Example
tuple1=(1, 2,2,6)
print(tuple1)
Output (1, 2,2,6)
Thank
You

More Related Content

Similar to prakash ppt (2).pdf

Python presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, BiharPython presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, BiharUttamKumar617567
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Chariza Pladin
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptxArpittripathi45
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programmingChetan Giridhar
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.supriyasarkar38
 
modul-python-part1.pptx
modul-python-part1.pptxmodul-python-part1.pptx
modul-python-part1.pptxYusuf Ayuba
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unitmichaelaaron25322
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizeIruolagbePius
 
Introduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and PythonIntroduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and PythonJen Stirrup
 

Similar to prakash ppt (2).pdf (20)

Python presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, BiharPython presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, Bihar
 
Python-Basics.pptx
Python-Basics.pptxPython-Basics.pptx
Python-Basics.pptx
 
Python Demo.pptx
Python Demo.pptxPython Demo.pptx
Python Demo.pptx
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
Python Programming.pptx
Python Programming.pptxPython Programming.pptx
Python Programming.pptx
 
Python Demo.pptx
Python Demo.pptxPython Demo.pptx
Python Demo.pptx
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.
 
Python Module-1.1.pdf
Python Module-1.1.pdfPython Module-1.1.pdf
Python Module-1.1.pdf
 
bhaskars.pptx
bhaskars.pptxbhaskars.pptx
bhaskars.pptx
 
Python intro
Python introPython intro
Python intro
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
Python
PythonPython
Python
 
modul-python-part1.pptx
modul-python-part1.pptxmodul-python-part1.pptx
modul-python-part1.pptx
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
Introduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and PythonIntroduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 

Recently uploaded (20)

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

prakash ppt (2).pdf

  • 1. Rewa Engineering College Rewa (M.P.) Internship on Python Programming language Session 2023-24 Submitted by Prakash tiwari 0301EC211036 Submitted To Prof. A. K. Singh
  • 2. Agenda • Brief History of python • What is python • Why python • Comments • Variables and data types • Typecasting in python • Loops in python • Functions in python • Lists in python • Tuples in python
  • 3. Brief History of Python • Invented in the Netherlands, early 90s by Guido van Rossum • Named after Monty Python • Open sourced from the beginning • Considered a scripting language, but is much more • Scalable, object oriented and functional from the beginning • Used by Google from the beginning • Increasingly popular
  • 4. What Is Python? • Python is dynamically typed, General Purpose Language that supports an object oriented programming as well as a functional programming approach • Python is an interpreted and a high level language, It is easy to learn and it has efficient high level data structure • Python comes with a large library of standard modules
  • 5.
  • 6. Comments A Comment is the part of coding file that programmer does not want to execute, rather the programmer uses it to either explain the block of the code or to avoid the execution of a specific part of code while testing. Single line comment To write a comment just add ‘#’ at the start of the line Example: # this is a single line comment Print(“this is a print statement”) Output: this is a print statement
  • 7. Multiline comments • To write a multi line comments we can use # at starting of each line or we can use the multiline string • Example: “““This is an if-else statement. it will execute a block of code if a specified condition is true. if the condition is false then it will execute another block of code. ”””
  • 8. Variables and Data types • Variables: Variable is like a container that holds data. Very similar to how our containers in kitchen holds sugar, salt etc. creating a variable Is like creating a placeholder in memory and assigning it some value. for example a=5678 print(a) b=“Akash” print(b) Output : 5678 Akash So here a and b are variables and 5678 and Akash are data types
  • 9.
  • 10. Typecasting in python The conversion of one data type into the other data type is known as typecasting in python or type conversion in python. Python supports a wide variety of functions or methods like: int(), float(), str(), ord(), hex() , oct(), tuple(), set(), list(), dict(), etc. for type casting in python. Two types of typecasting 1. Explicit typecasting 2. Implicit typecasting
  • 11. 1. Explicit typecasting The conversion of one datatype into another datatype, done via developer or programmer’s intervention or manually as per the requirement , is known as explicit typecasting. Example: a=“1” b=“2” print(int(a) +int(b)) Output : 3 2. Implicit typecasting According to the level, one data type is converted into other by the python interpreter itself (automatically) . This is called implicit typecasting. Example c=1.9 d=8 Print(c+d) output: 9.9
  • 12. Loops in python • Sometimes a programmer wants to execute a group of statements a number of times. This can be done using loops. Based on this loops are further classified into following types; for loop, while loop. For loop For loop can iterate over a sequence of iterable object in python. Iterating over a sequence is nothing but iterating over string, list,tuple , sets, dictionaries. Colors=[“Red”, “Green”, “Blue”, “Yellow”] for color in colors Print(color) Output: Red Green Blue Yellow
  • 13. While loop As the name suggest, while loop execute statements while the condition is true. As soon as the condition becomes false, the interpreter comes out of the while loop. Example: count=5 while( count > 0 ) print(count) count= count-1 Output=5 4 3 2 1
  • 14. Functions in python • A function is a block of code that performs a specific task whenever it is called. In bigger programs where we have large amounts of code , it is advisable to create or use existing functions that make the program flow organized and neat. • There are two types of functions 1. Built-in functions 2.User-defined functions Built-in functions These functions are defined and pre-coded in python. Some examples of built-in functions are as follows: min(), max(), len(), sum(), type(), range(), dict() , list(), touple(), set(), print() etc.
  • 15. • User-defined functions • We can create functions to perform specific tasks as per our needs. Such functions are called as user defined functions • Syntax def function_name (Parameter) : pass • Example: def calculateAmean( a, b) mean=(a+b) /2 print(mean)
  • 16. Lists in python • Lists are ordered collections of data items. • They stores multiple items in a single variable. • List items are separated by commas and enclosed within square brackets. • List are changeable meaning we can alter them after creation. Example: list1=[1, 2,3,4,5,6] list2=[“Red”, “Green”, “blue”] print(list1) print(list2) outputs-[1, 2,3,4,5,6] [“Red”, “Green”, “blue”]
  • 17. Tuple in Python • Tuples are ordered collection of objects. They store multiple items in a single variable. Tuple items are seperated by commas and enclosed within round brackets() . Tuples are unchangeable meaning we cannot alter them after creation. • Example tuple1=(1, 2,2,6) print(tuple1) Output (1, 2,2,6)