我有两个字符串:
a = "hello world" b = "world hello"
哪个运行得更快?
set(a)==set(b)
或
from collections import Counter Counter(a)==Counter(b)
为什么?有没有跑得更快的呢?
https://stackoverflow.com/questions/56763642
相似问题