TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

My Favorite One-Liners: Python Edition

5 pointsby mr_o47over 1 year ago

1 comment

gus_massaover 1 year ago
&gt; <i>Check if a List Contains All Elements of Another List:</i><p>&gt; <i>contains_all = all(elem in list1 for elem in list2)</i><p>Isn&#x27;t that quadratic? Can&#x27;t it be implemented in linear (or NlogN) time using sets?