Use the list
constructor:
>>> list("foobar")
['f', 'o', 'o', 'b', 'a', 'r']
list
builds a new list using items obtained by iterating over the input iterable. A string is an iterable — iterating over it yields a single character at each iteration step.
More Related Contents:
- What does += mean in this context?
- Most efficient way to build single-element list from string with or without spaces? [closed]
- Unable to use convert strings into integers for a for loop
- User input integer list [duplicate]
- How to split a string into a list of characters?
- How to convert list to string [duplicate]
- Create nice column output in python
- How would you make a comma-separated string from a list of strings?
- Converting a String to a List of Words?
- String to list in Python
- How can I convert each item in the list to string, for the purpose of joining them? [duplicate]
- Removing a list of characters in string
- case-insensitive list sorting, without lowercasing the result?
- How do I serialize a Python dictionary into a string, and then back to a dictionary?
- How to convert a string of space- and comma- separated numbers into a list of int? [duplicate]
- Splitting List That Contains Strings and Integers
- How to convert a string list into an integer in python [duplicate]
- Convert list of strings to dictionary
- Replace special characters in a string in Python
- Sort list of strings by a part of the string
- Converting a string that represents a list, into an actual list object
- Python: find closest string (from a list) to another string
- convert a string which is a list into a proper list python
- How to concatenate (join) items in a list to a single string
- split string in python to get one value?
- How to sort a list of strings in reverse order without using reverse=True parameter?
- How to convert list of intable strings to int [duplicate]
- How does str.startswith really work?
- Join a list of strings in python and wrap each string in quotation marks
- Length of longest word in a list