Are tuples faster than lists?

Are tuples faster than lists?

Tech·WHYS

4 года назад

280 Просмотров

Are tuples faster than lists?
Jul 4, 2019

Lists are allocated in two blocks: the fixed one with all the Python object information and a variable sized block for the data. It is the reason creating a tuple is faster than List. It also explains the slight difference in indexing speed is faster than lists, because in tuples for indexing it follows fewer pointers.


··········

“Be competent, be more skilful than others. Here you will find the answer to all of your questions.”

✋ The purpose of our channel is to create EDUCATIONAL content. That was our intention with this video as well. We would like to give you COMPLETE INFORMATION on the subject, so unfortunately we can also discuss elements that may be hurtful to people.

Тэги:

#Are_tuples_faster_than_lists? #frequently_asked_question #question_and_answer #answer
Ссылки и html тэги не поддерживаются


Комментарии: