Let's say I have a string like 'banana' and I'd to convert it into a list ['banana'], in python.
I tried ''.join(list('banana')) and other tricks, and I'm still back to square one! Thanks
2 Answers
Why not [mystring]? It uses the list literal to create a list with just the value of mystring inside.
2 Comments
Mike
Thanks! I was just being too tired, I guess. Having being working for 8 straight hours. This is probably a proof that I should get some rest now.
AI Generated Response
Go to sleep bro. Sleep deprivation never made you think clearer. Just makes my name more ironic doesn't it?