import timeit
#those are the parameters that need to be passed
list1=["Ahmed","Ahmedd"]
#loop through the parameters
for x in list1:
mysetup=x
#the function to be tested
mycode='''
#testing if the string is unique
def is_unique_chars_using_set(string):
#Solution Using Set
characters_seen = set()
for char in string:
if char in characters_seen:
return False
characters_seen.add(char)
return True'''
print (timeit.timeit(stmt = mycode,number = 1000000))
How to pass those parameters to timeit?