Code AnalysisIntermediate 45s
set vs list membership
What is the output? (relative speed guide)
Starter code
# Creating a large list and set: import time data = list(range(10000)) s = set(data) # Checking if 9999 in data (list - slow) vs in s (set - fast)
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.