Thanks. It seems that dictionary is a sorted list of tuples, so the procedure of searching an element is quite quick.