如何在python中构造一组列表项? - How to construct a set out of list items in python?

10/14 17:22
阅读数 0

问题:

I have a list of filenames in python and I would want to construct a set out of all the filenames.我在 python 中有一个文件名list ,我想从所有文件名中构建一个set

filelist=[]
for filename in filelist:
    set(filename)

This does not seem to work.这似乎不起作用。 How can do this?怎么能做到这一点?


解决方案:

参考一: https://en.stackoom.com/question/14AAn
参考二: https://stackoom.com/question/14AAn
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部