python

String characters to list items using python

You can convert string to list and all its characters to list items using python.

my_str = "Devsheet"

my_list = list(my_str)
print(my_list)

#-> ['D', 'e', 'v', 's', 'h', 'e', 'e', 't']
Output
['D', 'e', 'v', 's', 'h', 'e', 'e', 't']
Was this helpful?