Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # sets_vs_lists_timed.py
- from timeit import timeit
- def test():
- print(
- timeit(
- "499 in n", globals={"n": numbers}
- )
- )
- numbers = set([*range(500)])
- test()
- numbers = [*range(500)]
- test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement