In Python, there are 3 Array like datatypes (unless I'm forgetting one).
Those being Tuples ((1,2,6,3)
), Lists ([1,2,6,3]
), and Sets ({1,2,6,3}
).
They each have different methods defined to them, but when is it correct to use one over the other? There are questions and answers already about these but none of them seem to say when to use one over the other.
They can each be converted to one another so it's possible to just use one over the other and convert when necessary. Though that probably isn't a preferred method.
So, I ask, under what situation would you choose one type over the other?