Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # timeit_find_surprise.py
- from timeit import timeit
- t = timeit(stmt='"5" in string',
- setup='string = "abcefg0123456789"',
- number=10 ** 7)
- print t
- t = timeit(stmt='"5" in string',
- setup='string = list("abcefg0123456789")',
- number=10 ** 7)
- print t
- t = timeit(stmt='"5" in string',
- setup='string = set("abcefg0123456789")',
- number=10 ** 7)
- print t
Add Comment
Please, Sign In to add comment