Skip to content

Commit 2d1a235

Browse files
committed
Merge branch 'master' of github.com:UWPCE-PythonCert/Python300-SystemDevelopmentWithPython-Spring-2014
2 parents 19f2a36 + 28fbe01 commit 2d1a235

File tree

5 files changed

+38
-33952
lines changed

5 files changed

+38
-33952
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
3+
from timer import timer
4+
5+
list_data = [l.strip() for l in open('/usr/share/dict/words')] * 10
6+
7+
set_data = set(list_data)
8+
9+
10+
@timer
11+
def set_contains(x):
12+
return x in set_data
13+
14+
@timer
15+
def list_contains(x):
16+
return x in list_data
17+
18+
19+
if __name__ == "__main__":
20+
set_contains("zebra")
21+
list_contains("zebra")

0 commit comments

Comments
 (0)