Tuple BasicsΒΆ
-
Create a variable
xycoords
that refers to a tuple containing two values:3
and-7
.Create a tuple with(
and)
and a comma separating each element.
-
Write code to print out the item at index 1 of already-defined tuple
xycoords
.You can index a tuple just like you index a list or string, since a tuple is also a sequence.