The example works because range objects implement __len__ which is where tqdm will get it's total/count information from.
The example works because range objects implement __len__ which is where tqdm will get it's total/count information from.