In this video, you will learn about tuples. Which are used to store multiple values of different data types. Developers use tuples when they want to assign a variable with multiple values or return multiple values from a function. Tuples are useful for temporary groups of related values. They are not suited to the creation of complex data structures. In an earlier lesson, you learned that you can store multiple data types in an array using the any data type. For example, suppose I wanted to create an inventory for a restaurant using an array of food items. I can do this by creating an array that can hold three data types, Astring, an integer, and boolean. First, I type the keyword var and the variable name veg array followed by a colon. And then the keyword any inside square brackets, followed by the assignment operator. Next, inside another set of square brackets I add the string value of carrot, the integer value of three and the boolean value of true. Notice that these values are separated by a comma. While this will work, arrays are not always best suited. So, another option is to use tuples like an array. A tuple is a list of items, more specifically a comma separated list of items enclosed in parenthesis. I can create a tuple and assign it to a variable by typing the keyword var and the variable name, vegetable followed by the assignment operator. And then I create a set of open and closed parenthesis to place the couple values. Next inside the parenthesis, I add the string value carrot, the integer value of three and the boolean value of true. Again, notice that these values are separated by a comma. Tuples are especially useful because they can be passed into things like functions to return multiple individual values. Okay, so let me delete the line of code with the array now. So, once you have declared your tuple you might need to extract its individual values. This is known as decomposing a tuple and there are a couple of ways to do this. To decompose a tuple, I can assign its elements to individual variables. To do this, I start by typing the keyword var and then inside parenthesis the variables of veg, type, quantity, and in stock. Next, I use the assignment operator to assign these to the tuple. Now I can use the print function to print the value stored in my tuple such as quantity. When I run the code it builds the playground and returns a value of three. Another way to do this, is to create a topple with named parameters. To demonstrate this, I declare another variable named veg and assign the equal operator to parenthesis. Next, inside the parenthesis, I can define the name and value for each element using key value pairs. For example, veg type colon and then carrot. Then quantity colon and then three. And finally, in stock colon and then true. So, now when I add a print function, I can use a key to access and return the value. When I run this code, carrot is retrieved from the tuple. Another way that you can access values in a tuple is with the help of indexes. Instead of supplying the tuple name, you can use the index number. For example, veg dot 0 which will print carrot and veg dot 1, which will print three. It's important to note that like an array, the index begins at zero and you can't include any indexes outside of the bounds of the tuple. Okay. So, now what if I don't want to extract anything out of the tuple? I can use the same methods as before. But by using an underscore, I can tell Swift to ignore specific values. For example, I type less and then a space and then inside perenthesis I type the underscore symbol, comma, space, quantity, comma space and then another underscore symbol. This is then assigned to the topple named vegetables. Now, what happens here, is that Swift ignores veg name and in stock but keeps the value of quantity. In this video, you learned about tuples and how they are used to store multiple values of different data types. You'll learned how to create a tuple some of the main methods, developers used to decompose a tuple. And finally, how to modify its values. Tuples are useful for temporary groups of related values and developers use them when their values or related values are likely to change or be dropped. You can think of them as a low cost way of grouping values, rather than the full on creation of a data structure like an array.