What is the difference between List and Tuple in Python?
Explanation
Tuple is immutable data type while list is mutable. That means, that tuple cannot be modified after it is defined. List can be freely modified after its definition.
As a result tuple can be used as a key for set / dictionary while list cannot (tuple is hashable while list is not).

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Python
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты