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
20 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 16, 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
• 56,100 points
11 views
0 votes
1 answer

difference between lists and sets

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

answered Jan 7 in Python by SDeb
• 9,300 points
11 views
+1 vote
4 answers

How can I concatenate str and int objects?

If you want to concatenate int or ...READ MORE

answered Oct 18, 2018 in Python by subhm
29 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 920 points
19 views
+4 votes
6 answers
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
38 views
0 votes
1 answer

Iterating over multiple lists

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

answered Apr 25, 2018 in Python by Nietzsche's daemon
• 4,260 points
9 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.