SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
Python Programming
Lists in Python
 Python offers a range of compound datatypes
often referred to as sequences.
 Lists are a useful tool for preserving a sequence
of data and further iterating over it.
 Note:Like variables store 1 value, lists can be
used to store multiple values.
Python list functions
Lits has 4 atrributes
 Name of the list
 Values inside the list
 Length of list
 Calculated by len(list)
 Indexes of list
 Indexes of list start with 0 to (len(list) – 1)
Python list functions
Python list functions
Python list functions
Python list functions
Python list functions
Add elements to list
Python list functions
Strings are stored as lists in python
Python list functions
Python list functions
Functions in python
 In Python, function is a group of related
statements that perform a specific task.
 Functions help break our program into smaller
and modular chunks.
 As our program grows larger and larger,
functions make it more organized and
manageable.
Syntax of function
Python list functions
Return statement
Scope and Lifetime of variables
 Scope of a variable is the portion of a program
where the variable is recognized. Parameters
and variables defined inside a function is not
visible from outside. Hence, they have a local
scope.
 Lifetime of a variable is the period throughout
which the variable exits in the memory. The
lifetime of variables inside a function is as long
as the function executes.
 They are destroyed once we return from the
function. Hence, a function does not remember
Python list functions
This work is licensed under a Creative Commons
Attribution-ShareAlike 3.0 Unported License.
It makes use of the works of Mateus Machado Luna.

More Related Content

PPTX
Python for loop
PPTX
Introduction To Programming with Python-3
PPTX
Introduction To Programming with Python-4
PPTX
Introduction to Python Part-1
PDF
Python tuple
PPTX
Python introduction
PDF
What is Tuple in python? | Python Tuple Tutorial | Edureka
PPTX
Python for loop
Introduction To Programming with Python-3
Introduction To Programming with Python-4
Introduction to Python Part-1
Python tuple
Python introduction
What is Tuple in python? | Python Tuple Tutorial | Edureka

What's hot (16)

PPTX
Python advance
PPTX
Python Basics
PPTX
Intro to Python Programming Language
PPTX
Python programming language
PPTX
Python ppt
PPTX
9 big o-notation
PDF
Python cheat-sheet
PPT
Strings Arrays
PPTX
Python 3 Programming Language
PPTX
Big o notation
PPTX
Python basics
PPT
Complexity
PPT
List and iterator
PDF
Introduction To Programming with Python
PDF
Zero to Hero - Introduction to Python3
Python advance
Python Basics
Intro to Python Programming Language
Python programming language
Python ppt
9 big o-notation
Python cheat-sheet
Strings Arrays
Python 3 Programming Language
Big o notation
Python basics
Complexity
List and iterator
Introduction To Programming with Python
Zero to Hero - Introduction to Python3
Ad

Similar to Python list functions (20)

PPTX
Phython presentation
DOCX
Python Interview Questions For Freshers
PDF
Python Training in Chandigarh
PDF
List and tuple in python
PDF
Python 3.x quick syntax guide
PDF
Python Basics Understanding Variables.pdf
PDF
Python Basics Understanding Variables.pdf
PPTX
Introduction to Python for Data Science and Machine Learning
PPT
Python - Module 1.ppt
PDF
Top 80 Interview Questions on Python for Data Science | Tutort - Best Data Sc...
PPTX
lakshya's ppt python for final final.pptx
PPTX
PYTHON ppt for 2 nd year students very useful
PDF
Python Course In Chandigarh
PPTX
Python Data types like mutable and immutable
PPTX
PYTHON PPT.pptx python is very useful for day to day life
PDF
Top Most Python Interview Questions.pdf
PDF
Python: An introduction A summer workshop
PDF
🐍⚡ “Python Panache: Code Like a Pro, Not a Programmer!”
PPTX
pengenalan python apa itu python untuk apa.pptx
PPTX
Python
Phython presentation
Python Interview Questions For Freshers
Python Training in Chandigarh
List and tuple in python
Python 3.x quick syntax guide
Python Basics Understanding Variables.pdf
Python Basics Understanding Variables.pdf
Introduction to Python for Data Science and Machine Learning
Python - Module 1.ppt
Top 80 Interview Questions on Python for Data Science | Tutort - Best Data Sc...
lakshya's ppt python for final final.pptx
PYTHON ppt for 2 nd year students very useful
Python Course In Chandigarh
Python Data types like mutable and immutable
PYTHON PPT.pptx python is very useful for day to day life
Top Most Python Interview Questions.pdf
Python: An introduction A summer workshop
🐍⚡ “Python Panache: Code Like a Pro, Not a Programmer!”
pengenalan python apa itu python untuk apa.pptx
Python
Ad

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Classroom Observation Tools for Teachers
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
RMMM.pdf make it easy to upload and study
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Basic Mud Logging Guide for educational purpose
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial disease of the cardiovascular and lymphatic systems
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Classroom Observation Tools for Teachers
Final Presentation General Medicine 03-08-2024.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
O7-L3 Supply Chain Operations - ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
VCE English Exam - Section C Student Revision Booklet
RMMM.pdf make it easy to upload and study
Supply Chain Operations Speaking Notes -ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
Cell Types and Its function , kingdom of life
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Basic Mud Logging Guide for educational purpose
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf

Python list functions

  • 2. Lists in Python  Python offers a range of compound datatypes often referred to as sequences.  Lists are a useful tool for preserving a sequence of data and further iterating over it.  Note:Like variables store 1 value, lists can be used to store multiple values.
  • 4. Lits has 4 atrributes  Name of the list  Values inside the list  Length of list  Calculated by len(list)  Indexes of list  Indexes of list start with 0 to (len(list) – 1)
  • 12. Strings are stored as lists in python
  • 15. Functions in python  In Python, function is a group of related statements that perform a specific task.  Functions help break our program into smaller and modular chunks.  As our program grows larger and larger, functions make it more organized and manageable.
  • 19. Scope and Lifetime of variables  Scope of a variable is the portion of a program where the variable is recognized. Parameters and variables defined inside a function is not visible from outside. Hence, they have a local scope.  Lifetime of a variable is the period throughout which the variable exits in the memory. The lifetime of variables inside a function is as long as the function executes.  They are destroyed once we return from the function. Hence, a function does not remember
  • 21. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. It makes use of the works of Mateus Machado Luna.