小编ami*_*i91的帖子

TypeError:不可用类型:使用内置set函数时的'list'

我有一个包含多个列表作为其元素的列表

eg: [[1,2,3,4],[4,5,6,7]]
Run Code Online (Sandbox Code Playgroud)

如果我使用内置的set函数从这个列表中删除重复项,我会收到错误

TypeError: unhashable type: 'list'
Run Code Online (Sandbox Code Playgroud)

我正在使用的代码是

TopP = sorted(set(TopP),reverse=True)
Run Code Online (Sandbox Code Playgroud)

其中TopP是一个列表,就像在例如Above

这个set()的用法是错误的吗?有没有其他方法可以对上面的列表进行排序?

python list duplicates

35
推荐指数
2
解决办法
7万
查看次数

使用MPEG DASH流式传输仅音频(.mp3)文件

有什么方法可以.mp3使用来流式传输仅音频文件()MPEG DASH。我正在寻找在HTML5不使用渐进式下载的情况下在chrome上运行音频的方法。有任何想法吗 ?

html5 mp3 google-chrome html5-audio mpeg-dash

3
推荐指数
1
解决办法
3061
查看次数

Is there a way to find index of "in" keyword match in python

The title of this post is probably pretty vague. Here is what I need to know

If I use something like

if x in list
Run Code Online (Sandbox Code Playgroud)

how do I find the index in the list where a match occurs?

python

1
推荐指数
1
解决办法
322
查看次数

标签 统计

python ×2

duplicates ×1

google-chrome ×1

html5 ×1

html5-audio ×1

list ×1

mp3 ×1

mpeg-dash ×1