Is it faster to loop through a Python set of numbers or a Python set of letters given that each set is the exact same length and each item within each set is the same length? Why?
I would think that there would be a difference because letters have more possible characters [a-zA-Z] than numbers [0-9] and therefor would be more 'random' and likely affect the hashing to some extent.
numbers = set([00000,00001,00002,00003,00004,00005, ... 99999])
letters = set(['aaaaa','aaaab','aaaac','aaaad', ... 'aaabZZ']) # this is just an example, it does not actually end here
for item in numbers:
do_something()
for item in letters:
do_something()
where len(numbers) == len(letters)
Update: I am interested in Python's specific hashing algorithm and what happens behind the scenes with this implementation.