Open In App

Split String into List of Characters in Python

Last Updated : 27 Nov, 2025
Comments
Improve
Suggest changes
62 Likes
Like
Report

Given a string, the task is to split it into a list where each element represents a single character from the string. For Example:

Input: s = "geeks"
Output: ['g', 'e', 'e', 'k', 's']

Let's explore different methods to split a string into a list of characters.

Using List

To convert a string into a list of characters in Python we can use the built-in list() function, which directly converts each character in the string to a list element.

Python
s = "hello"
a = list(s)
print(a)

Output
['h', 'e', 'l', 'l', 'o']

Explanation:

  • list(s) splits the string into individual characters.
  • 'hello' becomes ['h', 'e', 'l', 'l', 'o'].

Using List Comprehension

List comprehension provides a shorter and clearer syntax compared to the traditional loop approach.

Python
s = "hello"
a = [char for char in s]
print(a)

Output
['h', 'e', 'l', 'l', 'o']

Explanation: [char for char in s] loops through each character in s and places each char into the list, creating a list of all characters.

Using Unpacking Operator *

The unpacking operator * can be used to split a string into a list of characters in a single line. This approach is compact and works well for quickly converting a string to a list.

Python
s = "hello"
a = [*s]
print(a)

Output
['h', 'e', 'l', 'l', 'o']

Explanation: [*s] unpacks every character of the string s and puts each one directly into the list.

Using a Loop

We can also use a simple loop (for loop) to convert string into list of characters. This method is useful when we want to include additional logic within the loop.

Python
s = "hello"
a = []       
for char in s:
  a.append(char)  
print(a)

Output
['h', 'e', 'l', 'l', 'o']

Explanation: Iterate over every character using for loop and use .append() method to add those chaacters to the list 'a'.


Python Program to Split String into List of Characters

Explore