2015-07-10 19:40:10 +02:00
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
|
|
import time
|
2021-01-31 05:40:20 +00:00
|
|
|
start = time.process_time()
|
2015-07-10 19:40:10 +02:00
|
|
|
|
|
|
|
|
count = 0
|
|
|
|
|
for i in range(0, 1000000):
|
|
|
|
|
if "abc" == "abc":
|
|
|
|
|
count = count + 1
|
|
|
|
|
if "a slightly longer string" == \
|
|
|
|
|
"a slightly longer string":
|
|
|
|
|
count = count + 1
|
|
|
|
|
if "a significantly longer string but still not overwhelmingly long string" == \
|
|
|
|
|
"a significantly longer string but still not overwhelmingly long string":
|
|
|
|
|
count = count + 1
|
|
|
|
|
|
|
|
|
|
if "" == "abc":
|
|
|
|
|
count = count + 1
|
|
|
|
|
if "abc" == "abcd":
|
|
|
|
|
count = count + 1
|
2015-11-11 07:55:48 -08:00
|
|
|
if "changed one character" == "changed !ne character":
|
2015-07-10 19:40:10 +02:00
|
|
|
count = count + 1
|
|
|
|
|
if "123" == 123: count = count + 1
|
|
|
|
|
if "a slightly longer string" == \
|
|
|
|
|
"a slightly longer string!":
|
|
|
|
|
count = count + 1
|
|
|
|
|
if "a slightly longer string" == \
|
|
|
|
|
"a slightly longer strinh":
|
|
|
|
|
count = count + 1
|
|
|
|
|
if "a significantly longer string but still not overwhelmingly long string" == \
|
|
|
|
|
"another":
|
|
|
|
|
count = count + 1
|
|
|
|
|
|
|
|
|
|
print(count)
|
2021-01-31 05:40:20 +00:00
|
|
|
print("elapsed: " + str(time.process_time() - start))
|