You just need to index the string, just like you do with a list.

>>> 'hello'[3]
l

Note that Python indices (like most other languages) are zero based, so the first element is index 0, the second is index 1, etc.

For example:

>>> 'hello'[0]
h
>>> 'hello'[1]
e
Answer from Volatility on Stack Overflow
🌐
W3Schools
w3schools.com › python › ref_string_index.asp
Python String index() Method
Remove List Duplicates Reverse ... Python Study Plan Python Interview Q&A Python Training ... The index() method finds the first occurrence of the specified value....
🌐
Python documentation
docs.python.org › 3 › library › stdtypes.html
Built-in Types — Python 3.14.7 documentation
Strings may also be created from other objects using the str constructor. Since there is no separate “character” type, indexing a string produces strings of length 1.
🌐
Stanford CS
cs.stanford.edu › people › nick › py › python-string.html
Python Strings
Similarly, if the start index is greater or equal to the end index, the slice is just the empty string. >>> s = 'Python' >>> s[2:999] 'thon' >>> s[3:2] # zero chars ''
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-index-and-slice-strings-in-python-3
How To Index and Slice Strings in Python | DigitalOcean
Learn how to index and slice strings in Python 3 with step-by-step examples. Master substring extraction, negative indexing, and slice notation.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-string-index-method
Python String index() Method - GeeksforGeeks
May 2, 2025 - The index() method in Python is used to find the position of a specified substring within a given string. It is similar to the find() method but raises a ValueError if the substring is not found, while find() returns -1. This can be helpful ...
Find elsewhere
🌐
Manifoldapp
cuny.manifoldapp.org › read › how-to-code-in-python-3 › section › 93337ae8-329e-493b-b15a-7fe26f12f037
How To Index and Slice Strings | How To Code in Python 3 | Manifold @CUNY
Any other symbol or punctuation mark, such as *#$&.;?, is also a character and would be associated with its own index number. The fact that each character in a Python string has a corresponding index number allows us to access and manipulate strings in the same ways we can with other sequential data types.
🌐
UC Berkeley Statistics
stat.berkeley.edu › ~spector › extension › python › notes › node19.html
Indexing and Slicing
To extract a single character from a string, follow the string with the index of the desired character surrounded by square brackets ([ ]), remembering that the first character of a string has index zero. >>> what = 'This parrot is dead' >>> what[3] 's' >>> what[0] 'T' If the subscript you ...
🌐
Built In
builtin.com › software-engineering-perspectives › python-substring-indexof
5 Ways to Find the Index of a Substring in Python | Built In
The index() method in Python finds the first occurrence of a specific character or element in a string or list. If the character or element is found, its index value will be returned.
🌐
CodeHS
codehs.com › tutorial › 13725
Tutorial: Indexing Python Strings | CodeHS
Learn how to access specific items by indexing through Python strings.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-string
Python String - GeeksforGeeks
Python does not have a separate character type. A single character is treated as a string of length one. Strings are commonly used for text handling and manipulation. Strings can be created using either single ('...') or double ("...") quotes. Both behave the same. ... Use triple quotes ('''...''' ) or ( """...""") for strings that span multiple lines. Newlines are preserved. ... Strings are indexed sequences.
Published: June 11, 2026
🌐
Programiz
programiz.com › python-programming › methods › string › index
Python String index()
Online Python Online JavaScript ... Online Go Online Rust Online Scala Online Dart Online R Online Ruby ... The index() method returns the index of a substring inside the string (if found)....
🌐
Tutorial Teacher
tutorialsteacher.com › python › string-index
Python string.index() Method (With Examples)
Regex in Python · Create GUI using Tkinter · Entity Framework Extensions - Boost EF Core 9 · Bulk Insert · Bulk Delete · Bulk Update · Bulk Merge · The index() method returns the index of the first occurence of a substring in the given string.
🌐
freeCodeCamp
forum.freecodecamp.org › python
String index beginner Python - Python - The freeCodeCamp Forum
April 30, 2020 - Could someone help me to figure out why the start index 7 and ending index 26 is True? Dont we count here from 0 ,then we wouldn`t get ‘7’ and ‘26’ indexes. A bit confused( # start parameter: 7 # "programming is easy to learn." string is searched result = text.endswith('learn.', 7) print(result) # Both start and end is provided # start: 7, end: 26 # "programming is easy" string is searched result = text.endswith('is', 7, 26) # Returns False print(result) result = text.endswith('easy', 7, ...
🌐
GitHub
gist.github.com › juanfdovilla › 74ce02e46855197b71ac2697ebe05283
Slicing and Indexing Strings in Python: A Comprehensive Guide · GitHub
Slicing and Indexing Strings in Python: A Comprehensive Guide · Raw · gistfile1.txt · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
🌐
Tutorialspoint
tutorialspoint.com › python › string_index.htm
Python String index() Method
The python string index() method is used to return the index of the input string where the substring is found. Basically, it helps us to find out if the specified substring is present in the input string.
🌐
Python Tutorial
pythontutorial.net › home › python string methods › python string index()
Python String index(): Locating the Index of a Substring in a String
December 28, 2020 - In this tutorial, you'll learn how to use the Python string index() method to get the lowest index of a substring in a string.