Python | Splitting string to list of characters Improve Improve Like Article Like Save Share Report Sometimes we get a string and we need to split it into the individual processing. This is quite a common utility and has application in many domains, be it Machine Learning or Web Development. Having shorthands to it can be helpful. Let’s discuss certain ways in which this can be done. Method #1 : Using list() This is the simplest way to achieve this particular task using the internal implementation of the inbuilt list function which helps in breaking a string into its character components. # Python3 code to demonstrate # split string to character list # using list() # initializing string test_string = 'GeeksforGeeks' # printing the original string print ("The original string is : " + str(test_string)) # using list() # to split string to character list res = list(test_string) # printing result print ("The splitted character's list is : " + str(res)) Output : The original string is : GeeksforGeeks The splitted character’s list is : [‘G’, ‘e’, ‘e’, ‘k’, ‘s’, ‘f’, ‘o’, ‘r’, ‘G’, ‘e’, ‘e’, ‘k’, ‘s’] Method #2 : Using map() The map function can also be used to perform this particular task. The map function needs to be feeded with None value to perform this task as first argument and the target string as the last argument. Works for Python2 only. # Python code to demonstrate # split string to character list # using map() # initializing string test_string = 'GeeksforGeeks' # printing the original string print ("The original string is : " + str(test_string)) # using map() # to split string to character list res = list(map(None, test_string)) # printing result print ("The splitted character's list is : " + str(res)) Output : The original string is : GeeksforGeeks The splitted character’s list is : [‘G’, ‘e’, ‘e’, ‘k’, ‘s’, ‘f’, ‘o’, ‘r’, ‘G’, ‘e’, ‘e’, ‘k’, ‘s’] Method #3 : Using List comprehension You can use a list comprehension to split the string into a list of characters:. Time complexity: O(n) Space complexity: O(n) test_string = 'GeeksforGeeks' # Use a list comprehension to split the string into a list of characters. res = print(res) # Output: ['G', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'G', 'e', 'e', 'k', 's'] Output : Output: [‘G’, ‘e’, ‘e’, ‘k’, ‘s’, ‘f’, ‘o’, ‘r’, ‘G’, ‘e’, ‘e’, ‘k’, ‘s’] Last Updated : 07 Jan, 2023 Like Article Save Article Previous Python - Convert String to matrix having K characters per row Next Python | Associating a single value with all list items Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Python | Splitting list on empty string Python | Splitting string list by strings Python | Splitting operators in String Python | Splitting Text and Number in string Python | Convert list of strings and characters to list of characters Splitting and Merging Channels with Python-OpenCV Python program to print k characters then skip k characters in a string Python - Remove front K characters from each string in String List Python | Convert List of String List to String List NLP | Splitting and Merging Chunks Like manjeet_04 Follow Article Tags : Python list-programs Python string-programs Python Python Programs Practice Tags : python