Using Lists and Tuples in Python

0 votes
Why does Python have data structures like tuples and lists? How are these data structures used optimally?
May 29, 2018 in Python by kek
41 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
if you are familiar with C programming, you consider lists to be analogous to arrays in C and, tuples to be analogous to structures, in that they stores data of different types. Do remember that tuples are immutable, unlike strings. I hope this will be helpful for you in deciding which data structures to use.
answered May 29, 2018 by Nietzsche's daemon
• 4,260 points

Related Questions In Python

0 votes
1 answer

Using filter, map, and reduce in Python

A quick implementation might look like this: from ...READ MORE

answered Nov 2, 2018 in Python by Priyaj
• 56,120 points
32 views
0 votes
1 answer

Shortest path from source to and from a negative cycle using Bellman Ford in Python

class NegativeWeightFinder: def __init__(self, graph: nx.Graph): ...READ MORE

answered Nov 13, 2018 in Python by Nymeria
• 3,500 points
48 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
• 1,400 points
27 views
+4 votes
6 answers
0 votes
1 answer

Copying lists in python

Assigning one list to another one simply ...READ MORE

answered Apr 30, 2018 in Python by Nietzsche's daemon
• 4,260 points
22 views
0 votes
1 answer

Using quotes in python

Both the conventions for enclosing strings are ...READ MORE

answered May 9, 2018 in Python by Nietzsche's daemon
• 4,260 points
7 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.