Lists and Tuples

0 votes
What is the difference between lists and tuples in python? Where should they be used?
Jul 2, 2018 in Python by emerald
477 views

2 answers to this question.

0 votes
answered Jul 2, 2018 by Nietzsche's daemon
• 4,260 points
0 votes
  • Lists are mutable homogeneous sequences whereas tuples are immutable heterogeneous data structures.
  • Tuples are sequences of different kinds of elements and you deal with the tuple as a coherent unit.
  • Lists are sequences of the same kind of elements, and you deal with the items individually.
  • Tuples have structure, lists have order.
answered Jul 17, 2018 by Mrunal
• 680 points

Related Questions In Python

0 votes
1 answer

Difference between del, remove and pop on lists

es, remove removes the first matching value, ...READ MORE

answered Aug 1, 2018 in Python by Priyaj
• 58,090 points
778 views
0 votes
1 answer

difference between lists and sets

There are a lot more differences such ...READ MORE

answered Jan 7, 2019 in Python by SDeb
• 13,300 points
587 views
0 votes
5 answers
0 votes
2 answers

What is the difference between python lists and arrays?

Python arrays and lists have the same ...READ MORE

answered Jun 11, 2019 in Python by Nisa
• 1,090 points
1,074 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,023 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,420 views
0 votes
1 answer

Using Lists and Tuples in Python

if you are familiar with C programming, ...READ MORE

answered May 29, 2018 in Python by Nietzsche's daemon
• 4,260 points
689 views
0 votes
1 answer

Iterating over multiple lists

import itertools for item in itertools.chain(listone, listtwo): #li ...READ MORE

answered Apr 25, 2018 in Python by Nietzsche's daemon
• 4,260 points
1,087 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP