The Python Oracle

Are tuples more efficient than lists in Python?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Flying Over Ancient Lands

--

Chapters
00:00 Question
00:21 Accepted answer (Score 205)
01:19 Answer 2 (Score 348)
04:32 Answer 3 (Score 230)
05:44 Answer 4 (Score 44)
06:36 Thank you

--

Full question
https://stackoverflow.com/questions/6863...

Accepted answer links:
[dis]: https://docs.python.org/3/library/dis.ht...

Answer 2 links:
[constant folded]: https://en.wikipedia.org/wiki/Constant_f...
[Here]: https://github.com/python/cpython/blob/5...
[Here]: https://github.com/python/cpython/blob/m...

Answer 3 links:
[timeit]: https://docs.python.org/2/library/timeit...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #performance #list #tuples #pythoninternals

#avk47