
July 9, 2020
2:11 a.m.
I think this comparison is unfair.
d.items()[0] vs list(d.items())[0]
Should be compared with `next(iter(d.items())`
d.keys()[-1] vs list(d.keys())[-1]
Should be compared with `next(reversed(d.keys()))`, or `next(reversed(d))`.
random.choice(d.items()) vs random.choice(list(d.items()))
Should be compared with `random.choice(items_list)` with `items_list = list(d.items())` setup too. -- Inada Naoki <songofacandy@gmail.com>