SlideShare a Scribd company logo
1 of 8
Download to read offline
Indexing
Python Tutorial
by Menard Maranan
“Indexing”
XIndexing
What is index?
>>>Index in Python refers to
the position of an “Iterable”.
>>>Index position starts from
the position ZERO ‘0’
“Indexing”
XIndexing
EXAMPLE:
Let’s take this string: “Hello”
>>>Index Positioning works like:
“|H|e|l|l|o|”
“Indexing”
XIndexing
EXAMPLE:
“|H|e|l|l|o|”
>>>The slices represents an
index position, and it starts
from Index Position ZERO
“Indexing”
XIndexing
EXAMPLE:
“|H|e|l|l|o|”
>>>You can call an Index
Position and get the value it
holds using Square Brackets []
“Indexing”
XIndexing
EXAMPLE:
“|H|e|l|l|o|”
>>>To call the letter “e”, just
refer to the index position 1,
since indexing starts from ZERO
“Indexing”
XIndexing
EXAMPLE:
message = “|H|e|l|l|o|”
>>>That’s why you can print the
“e” by typing: print(message[1])
“Indexing”
XIndexing
LET’S
TRY IT
!!!
🐍 🐍

More Related Content

What's hot

Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
PTCL
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular Expressions
Ranel Padon
 
Trees - Data structures in C/Java
Trees - Data structures in C/JavaTrees - Data structures in C/Java
Trees - Data structures in C/Java
geeksrik
 
Representation of binary tree in memory
Representation of binary tree in memoryRepresentation of binary tree in memory
Representation of binary tree in memory
Rohini Shinde
 

What's hot (20)

Strings in python
Strings in pythonStrings in python
Strings in python
 
Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
 
Linear Search Presentation
Linear Search PresentationLinear Search Presentation
Linear Search Presentation
 
Python list
Python listPython list
Python list
 
Python Datatypes by SujithKumar
Python Datatypes by SujithKumarPython Datatypes by SujithKumar
Python Datatypes by SujithKumar
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular Expressions
 
Searching & Sorting Algorithms
Searching & Sorting AlgorithmsSearching & Sorting Algorithms
Searching & Sorting Algorithms
 
Basic data types in python
Basic data types in pythonBasic data types in python
Basic data types in python
 
07 Analysis of Algorithms: Order Statistics
07 Analysis of Algorithms: Order Statistics07 Analysis of Algorithms: Order Statistics
07 Analysis of Algorithms: Order Statistics
 
Encoder
EncoderEncoder
Encoder
 
XII Computer Science- Chapter 1-Function
XII  Computer Science- Chapter 1-FunctionXII  Computer Science- Chapter 1-Function
XII Computer Science- Chapter 1-Function
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
 
Arduino and its hw architecture
Arduino and its hw architectureArduino and its hw architecture
Arduino and its hw architecture
 
Trees - Data structures in C/Java
Trees - Data structures in C/JavaTrees - Data structures in C/Java
Trees - Data structures in C/Java
 
Lists
ListsLists
Lists
 
Python set
Python setPython set
Python set
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
 
Representation of binary tree in memory
Representation of binary tree in memoryRepresentation of binary tree in memory
Representation of binary tree in memory
 

More from Menard Maranan

More from Menard Maranan (20)

Python return statement
Python return statementPython return statement
Python return statement
 
Python try except (menard maranan)
Python try except (menard maranan)Python try except (menard maranan)
Python try except (menard maranan)
 
Python packages (menard maranan)
Python packages (menard maranan)Python packages (menard maranan)
Python packages (menard maranan)
 
Python modules (menard maranan)
Python modules (menard maranan)Python modules (menard maranan)
Python modules (menard maranan)
 
Python inheritance (menard maranan)
Python inheritance (menard maranan)Python inheritance (menard maranan)
Python inheritance (menard maranan)
 
Python class (menard maranan)
Python class (menard maranan)Python class (menard maranan)
Python class (menard maranan)
 
Python functions (menard maranan)
Python functions (menard maranan)Python functions (menard maranan)
Python functions (menard maranan)
 
Python for loops
Python for loopsPython for loops
Python for loops
 
Python while loops (menard maranan)
Python while loops (menard maranan)Python while loops (menard maranan)
Python while loops (menard maranan)
 
Python if else statements (menard maranan)
Python if else statements (menard maranan)Python if else statements (menard maranan)
Python if else statements (menard maranan)
 
Python tuples (menard maranan)
Python tuples (menard maranan)Python tuples (menard maranan)
Python tuples (menard maranan)
 
Python sets (menard maranan)
Python sets (menard maranan)Python sets (menard maranan)
Python sets (menard maranan)
 
Python dictionaries (menard maranan)
Python dictionaries (menard maranan)Python dictionaries (menard maranan)
Python dictionaries (menard maranan)
 
Python nested lists (menard maranan)
Python nested lists (menard maranan)Python nested lists (menard maranan)
Python nested lists (menard maranan)
 
Python lists (menard maranan)
Python lists (menard maranan)Python lists (menard maranan)
Python lists (menard maranan)
 
Python data structures (menard maranan)
Python data structures (menard maranan)Python data structures (menard maranan)
Python data structures (menard maranan)
 
Python string formatting (menard maranan)
Python string formatting (menard maranan)Python string formatting (menard maranan)
Python string formatting (menard maranan)
 
Python comments (menard maranan)
Python comments (menard maranan)Python comments (menard maranan)
Python comments (menard maranan)
 
Slides python booleans (menard maranan)
Slides   python booleans (menard maranan)Slides   python booleans (menard maranan)
Slides python booleans (menard maranan)
 
Slides python numbers (menard maranan)
Slides   python numbers (menard maranan)Slides   python numbers (menard maranan)
Slides python numbers (menard maranan)
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 

Python indexing (menard maranan)