I have a word ALPHABET, how do I make a list with each letter seperated by a comma on PYTHON? output should be [A,L,P,H,A,B,E,T]

Viewed 14
a = ALPHABET

#CONVERT THIS TO A LIST

new_list = item_str.split(,)

Error - item is not defined

1 Answers

here it is, you have to transform a in a string because a = ALPHABET doesn't mean anything for python :)

a = "ALPHABET" new_list = [] for i in a: new_list.append(i) print(new_list)

Related