I have string as:
myString = 'example'
How can I convert it into a list as :
lst = ['example']
in an efficient way?
The most natural way is correct:
mystr = 'example' lst = [mystr]
Also, don't name your variables str; it overrides the built-in str.
str
1.4m articles
1.4m replys
5 comments
57.0k users