youbbs avatar

python list 高效去重

🕙 by youbbs

list高效去重

1
2
3
list(set(seq))
# or
{}.fromkeys(seq).keys()

参见 http://www.peterbe.com/plog/uniqifiers-benchmark/

💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.17.1 Processed in 0ms