Why is there a tuple and list in Python. They seemed to perform similar things.
bumsfeld
413
Nearly a Posting Virtuoso
Recommended Answers
Jump to PostThe tuple and the list have a few things in common. They are both indexed containers for objects. The tuple is a very simple container to put some objects together, separated by commas, so you can send them to and from functions or stick them into lists as a group …
Jump to PostYou can call them pointers to the address of each object. You can find the address with id(tuple_element). Take a look at this ...
# globals() brings up the present dictionary of Python internals # this would make a, b, c reference (point to) the same integer …
All 7 Replies
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
bumsfeld
413
Nearly a Posting Virtuoso
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
TimothyFitz
0
Newbie Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
bumsfeld
413
Nearly a Posting Virtuoso
jrcagle
77
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.