SlideShare a Scribd company logo
1 of 10
ANKUSH HAZRA PRN 21030141010
ARRAY
MODULE
THE ARRAY MODULE DEFINES AN OBJECT TYPE
THAT CAN COMPACTLY REPRESENT AN ARRAY
OF SOME BASIC VALUES AS CHARACTERS,
INTEGERS, FLOATING-POINT NUMBERS.
ARRAYS ARE SEQUENCE TYPES AND BEHAVE
SIMILARLY AS LISTS, EXCEPT THAT THE TYPE OF
OBJECTS STORED IN THEM IS CONSTRAINED.
APPEND()
METHOD
PYTHON APPEND() FUNCTION ENABLES US TO
ADD AN ELEMENT OR AN ARRAY TO THE END OF
ANOTHER ARRAY.
SYNTAX: LIST.APPEND(ELMNT)
FRUITS = ["APPLE", "BANANA",
"CHERRY"]
FRUITS.APPEND("ORANGE")
PRINT(FRUITS)
['APPLE', 'BANANA', 'CHERRY',
'ORANGE']
EXAMPLE &
OUTPUT
CLEAR()
METHOD
THIS METHOD REMOVES ALL THE ELEMENTS
FROM A LIST.
SYNTAX: LIST.CLEAR()
FRUITS = ["APPLE", "BANANA",
"CHERRY"]
FRUITS.CLEAR()
PRINT(FRUITS)
[]
EXAMPLE &
OUTPUT
COUNT()
METHOD
THIS METHOD METHOD RETURNS THE NUMBER
OF ELEMENTS WITH THE SPECIFIED VALUE.
SYNTAX: LIST.COUNT(VALUE)
FRUITS = ["APPLE", "BANANA",
"CHERRY"]
X = FRUITS.COUNT("CHERRY")
PRINT(X)
1
EXAMPLE &
OUTPUT
EXTEND()
METHOD
THIS METHOD METHOD ADDS THE SPECIFIED
LIST ELEMENTS (OR ANY ITERABLE) TO THE END
OF THE CURRENT LIST.
SYNTAX: LIST.EXTEND(ITERABLE)
FRUITS = ['APPLE', 'BANANA',
'CHERRY']
CARS = ['FORD', 'BMW', 'VOLVO']
FRUITS.EXTEND(CARS)
PRINT(FRUITS)
['APPLE', 'BANANA', 'CHERRY',
'FORD', 'BMW', 'VOLVO']
EXAMPLE &
OUTPUT
COPY()
METHOD
THIS METHOD RETURNS A COPY OF THE
SPECIFIED LIST.
SYNTAX: LIST.COPY()
FRUITS = ["APPLE", "BANANA",
"CHERRY"]
X = FRUITS.COPY()
PRINT(X)
['APPLE', 'BANANA', 'CHERRY']
EXAMPLE &
OUTPUT
INSERT()
METHOD
THIS METHOD INSERTS THE SPECIFIED VALUE AT
THE SPECIFIED POSITION.
SYNTAX: LIST.INSERT(POS, ELMNT)
FRUITS = ['APPLE', 'BANANA',
'CHERRY']
FRUITS.INSERT(1, "ORANGE")
PRINT(FRUITS)
['APPLE', 'ORANGE', 'BANANA',
'CHERRY']
EXAMPLE &
OUTPUT
POP()
METHOD
THIS METHOD REMOVES THE ELEMENT AT THE
SPECIFIED POSITION.
SYNTAX: LIST.POP(POS)
FRUITS = ['APPLE', 'BANANA',
'CHERRY']
FRUITS.POP(1)
PRINT(FRUITS)
['APPLE', 'CHERRY']
EXAMPLE &
OUTPUT
REMOVE()
METHOD
THIS METHOD REMOVES THE FIRST
OCCURRENCE OF THE ELEMENT WITH THE
SPECIFIED VALUE.
SYNTAX: LIST.REMOVE(ELMNT)
FRUITS = ['APPLE', 'BANANA',
'CHERRY']
FRUITS.REMOVE("BANANA")
PRINT(FRUITS)
['APPLE', 'CHERRY']
EXAMPLE &
OUTPUT

More Related Content

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Presentation on Array Module and Python

  • 1. ANKUSH HAZRA PRN 21030141010
  • 2. ARRAY MODULE THE ARRAY MODULE DEFINES AN OBJECT TYPE THAT CAN COMPACTLY REPRESENT AN ARRAY OF SOME BASIC VALUES AS CHARACTERS, INTEGERS, FLOATING-POINT NUMBERS. ARRAYS ARE SEQUENCE TYPES AND BEHAVE SIMILARLY AS LISTS, EXCEPT THAT THE TYPE OF OBJECTS STORED IN THEM IS CONSTRAINED.
  • 3. APPEND() METHOD PYTHON APPEND() FUNCTION ENABLES US TO ADD AN ELEMENT OR AN ARRAY TO THE END OF ANOTHER ARRAY. SYNTAX: LIST.APPEND(ELMNT) FRUITS = ["APPLE", "BANANA", "CHERRY"] FRUITS.APPEND("ORANGE") PRINT(FRUITS) ['APPLE', 'BANANA', 'CHERRY', 'ORANGE'] EXAMPLE & OUTPUT
  • 4. CLEAR() METHOD THIS METHOD REMOVES ALL THE ELEMENTS FROM A LIST. SYNTAX: LIST.CLEAR() FRUITS = ["APPLE", "BANANA", "CHERRY"] FRUITS.CLEAR() PRINT(FRUITS) [] EXAMPLE & OUTPUT
  • 5. COUNT() METHOD THIS METHOD METHOD RETURNS THE NUMBER OF ELEMENTS WITH THE SPECIFIED VALUE. SYNTAX: LIST.COUNT(VALUE) FRUITS = ["APPLE", "BANANA", "CHERRY"] X = FRUITS.COUNT("CHERRY") PRINT(X) 1 EXAMPLE & OUTPUT
  • 6. EXTEND() METHOD THIS METHOD METHOD ADDS THE SPECIFIED LIST ELEMENTS (OR ANY ITERABLE) TO THE END OF THE CURRENT LIST. SYNTAX: LIST.EXTEND(ITERABLE) FRUITS = ['APPLE', 'BANANA', 'CHERRY'] CARS = ['FORD', 'BMW', 'VOLVO'] FRUITS.EXTEND(CARS) PRINT(FRUITS) ['APPLE', 'BANANA', 'CHERRY', 'FORD', 'BMW', 'VOLVO'] EXAMPLE & OUTPUT
  • 7. COPY() METHOD THIS METHOD RETURNS A COPY OF THE SPECIFIED LIST. SYNTAX: LIST.COPY() FRUITS = ["APPLE", "BANANA", "CHERRY"] X = FRUITS.COPY() PRINT(X) ['APPLE', 'BANANA', 'CHERRY'] EXAMPLE & OUTPUT
  • 8. INSERT() METHOD THIS METHOD INSERTS THE SPECIFIED VALUE AT THE SPECIFIED POSITION. SYNTAX: LIST.INSERT(POS, ELMNT) FRUITS = ['APPLE', 'BANANA', 'CHERRY'] FRUITS.INSERT(1, "ORANGE") PRINT(FRUITS) ['APPLE', 'ORANGE', 'BANANA', 'CHERRY'] EXAMPLE & OUTPUT
  • 9. POP() METHOD THIS METHOD REMOVES THE ELEMENT AT THE SPECIFIED POSITION. SYNTAX: LIST.POP(POS) FRUITS = ['APPLE', 'BANANA', 'CHERRY'] FRUITS.POP(1) PRINT(FRUITS) ['APPLE', 'CHERRY'] EXAMPLE & OUTPUT
  • 10. REMOVE() METHOD THIS METHOD REMOVES THE FIRST OCCURRENCE OF THE ELEMENT WITH THE SPECIFIED VALUE. SYNTAX: LIST.REMOVE(ELMNT) FRUITS = ['APPLE', 'BANANA', 'CHERRY'] FRUITS.REMOVE("BANANA") PRINT(FRUITS) ['APPLE', 'CHERRY'] EXAMPLE & OUTPUT