+ 1
How convert a string in list of its character
For example hello =('h','e','l','l','o')
3 Réponses
+ 7
print(list('hello'))
# output:
['h', 'e', 'l', 'l', 'o']
+ 3
Firstly
print(tuple('hello')) =('h','e','l','l','o') #it mean it is tuple not list
#for making list
print(list('hello')) =['h', 'e', 'l', 'l', 'o')] #so it is list