FindNemo2

Run Settings
LanguagePython
Language Version
Run Command
from time import time def findNemo2(array): t0 = time() # return time in seconds for i in range(0, len(array)): if array[i] == 'nemo': print('F') # print('Found NEMO!') t1 = time() print('Call to find Nemo took ' + str((t1-t0) * 1000) + ' milliseconds') nemo = ['nemo'] everyone = ['dory', 'bruce', 'marlin', 'nemo', 'gill', 'bloat', 'nigel', 'squirt', 'darla', 'hank'] large = ['nemo' for i in range(0, 10000)] # findNemo2(nemo) # findNemo2(everyone) findNemo2(large)
Editor Settings
Theme
Key bindings
Full width
Lines