>>> x=[1,2]
>>> x[1]
2
>>> x=(1,2)
>>> x[1]
2

Are they both valid? Is one preferred for some reason?

7 Answers
7

Leave a Reply

Your email address will not be published. Required fields are marked *