What are the key difference between lists and tuples in python
Sno. LIST TUPLE
1 Lists are defined using square brackets [ ] Tuples are defined in round brackets ( )
2 Lists are mutable Tuples are immutable
3 Lists are many built-in methods: Since list is mutable list having additional functionalities like insert , sort and pop are available. Tuples are less in-built methods: tuples doesn’t support any of this functionalities
4 lists having variable length Tuples has fixed length
5 The Lists are less memory efficient than the tuples The tuples are more memory efficient than the list
In questa pagina del sito puoi guardare il video online What are the key difference between lists and tuples in python with examples della durata di ore minuti seconda in buona qualità , che l'utente ha caricato TutorialShore 29 dicembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 558 volte e gli è piaciuto 10 spettatori. Buona visione!