As with strings and lists, we can perform some basic operations on topples as well. So we can use the Len function to find out the number of elements inside the topple. So let's say we have topple two equals 123 and four now let's apply the Len function on top of to Solon of topple two returns of course, four because this is the number of elements inside topple through. Also we have the min and max functions available for finding the lowest and greatest value inside the topple. So mean of topple two returns one and max of topple two returns of course four. We can also concatenate and multiply the topple using the same old plus and multiplication operators.
So let's say we have topple to topple to concatenate it with another topple, let's say five, six and seven returns the two topples combined. Now let's try topple two times two. And indeed We have the expected result, the elements of topple two printed out twice inside the single topple. Since indexing applies to topples as it does to strings and lists, slicing is also possible with topples. Let's see a couple of examples without entering into the details too much about slicing, since the rules are basically identical, so we have tupple two, zero colon two returns the first two elements inside the tupple. This is of course equivalent, with tupple two of colon two, returning the same result.
Now let's try topple two, starting with the element at index one, up to the end of the topple returns, of course, two, three and four. Now let's have the entire string returned. So topple two without any indexes at all. Let's also use negative indexes. So topple through Have colon minus two will return topple two without the last two elements in the topple. So indeed we have one and two.
Now the other way around returning topple two without the first two elements in the topple okay and finally let's wrap topple indexing by inserting a step for our slices let's say topple two colon colon minus one returns the topple in reverse order another thing you can do with topples is you can check if an element is a member of a topple or not using the in and not in operators. So let's see this we have topple through again. Okay, and now let's check three in topple. This should return true and it did it does. Three not in topple to should return of course false. And finally let's try five in total two which obviously returns false The last thing on topples we can use the Dell command to delete the entire top.
So let's try they'll topple two. And now if we try to access Apple two again, we get a name error. Apple two is not defined. topples will be very useful in your Python programming adventure. Maybe you want to use them as much as lists or strings, but you should definitely keep them in mind.