Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
简单的问题。你将如何转换这样的列表:
["foo","banana","apple"]
进入
[["foo"],["banana"],["apple"]]
谢谢 !
>>> [[el] for el in ["foo","banana","apple"]] [['foo'], ['banana'], ['apple']]