question archive In Python, what is the primary difference between a list and a tuple?     A list can have the same item repeated whereas all elements of a tuple must by unique

In Python, what is the primary difference between a list and a tuple?     A list can have the same item repeated whereas all elements of a tuple must by unique

Subject:Computer SciencePrice:1.87 Bought7

In Python, what is the primary difference between a list and a tuple?

   

A list can have the same item repeated whereas all elements of a tuple must by unique.

   

Once created, a list is mutable whereas a tuple is immutable.

   

Lists can be used as dictionary keys whereas tuples may not be used as dictionary keys.

   

Lists can hold arbitrary data types (numbers, strings, etc.) whereas tuples can only hold numbers.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Answer:

Once created, a list is mutable whereas a tuple is immutable.