TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
My Favorite One-Liners: Python Edition
5 点
作者
mr_o47
超过 1 年前
1 comment
gus_massa
超过 1 年前
> <i>Check if a List Contains All Elements of Another List:</i><p>> <i>contains_all = all(elem in list1 for elem in list2)</i><p>Isn't that quadratic? Can't it be implemented in linear (or NlogN) time using sets?