+ 4
[CHALLENGE] Dissect a String and Add It To A List In Python?
Example: word = 'grass' Output: ['g','r','a','s','s]
6 Answers
+ 7
>>>word = 'grass'
>>> res = list(word)
>>> res
+ 3
print(list("grass"))
+ 2
word = input('Enter a word: ')
List = []
for i in range (0,len(word)):
List.append(word[i])
i += 1
print (List)
-------------------------------------
OUTPUT
>>>
Enter a word: grass
['g', 'r', 'a', 's', 's']
>>>
+ 1
# Python makes it easy
print(list(input()))
+ 1
# Here is my code
https://code.sololearn.com/cn46nY1Zwsgj/?ref=app