Python Institute PCAP Exam Dumps, Practice Test Questions

100% Latest & Updated Python Institute PCAP Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!

Python Institute PCAP Premium Bundle
$69.97
$49.99

PCAP Premium Bundle

  • Premium File: 141 Questions & Answers. Last update: May 6, 2024
  • Training Course: 57 Video Lectures
  • Study Guide: 320 Pages
  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates

PCAP Premium Bundle

Python Institute PCAP Premium Bundle
  • Premium File: 141 Questions & Answers. Last update: May 6, 2024
  • Training Course: 57 Video Lectures
  • Study Guide: 320 Pages
  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates
$69.97
$49.99

Download Free PCAP Exam Questions

File Name Size Download Votes  
File Name
python institute.actualtests.pcap.v2024-04-05.by.harry.79q.vce
Size
3.1 MB
Download
61
Votes
1
 
Download
File Name
python institute.selftestengine.pcap.v2022-01-21.by.jace.84q.vce
Size
3.23 MB
Download
867
Votes
1
 
Download
File Name
python institute.actualtests.pcap.v2021-09-24.by.millie.67q.vce
Size
2.21 MB
Download
991
Votes
1
 
Download
File Name
python institute.actualtests.pcap.v2021-08-25.by.tyler.40q.vce
Size
982.18 KB
Download
1019
Votes
1
 
Download
File Name
python institute.pass4sures.pcap.v2021-04-30.by.colton.40q.vce
Size
982.18 KB
Download
1149
Votes
2
 
Download

Python Institute PCAP Practice Test Questions, Python Institute PCAP Exam Dumps

With Examsnap's complete exam preparation package covering the Python Institute PCAP Practice Test Questions and answers, study guide, and video training course are included in the premium bundle. Python Institute PCAP Exam Dumps and Practice Test Questions come in the VCE format to provide you with an exam testing environment and boosts your confidence Read More.

Lists, Tuples and Dictionaries

1. Lists in Python

And that was one of the fundamental building blocks of the language. We've got numbers, integers, decimals,booleans, as well as strings. Well, there are some more types that we can use,more advanced types that provide a lot more functionality. And I'm going to get into collections. Now, collections are exactly what they sound like. It's a data structure that can contain multiple values. Now, a string value is just going to contain a sequence of strings, but you can actually define something called a list, and inside the list you can add multiple values. So let's take an example. I'm going to define a variable called my list and I'll assign it a set of values. Now the syntax here is that you need to use open and close square brackets, and inside of these square brackets we specify the items that we want to put into the list. And so let's do 12345. OK, so now I can print the contents of this list like this. Let's hit "run" and there you go. That's our list. I can also do a type, so I could use the type function. All right. Now, type is not a method because we're not doing a dot on an object. We're just doing type. just like print. "Print" is a function. A type is a function. You've seen this. And so we're just doing a test on this to see what the type is for this particular data or this variable. And of course, when you run it, it's going to say list. So, welcome to our next data type. It's a more advanced data type that provides a lot of functionality, and that's the list data type. So this is how you define a list. So now let's go over some of the things that you can do with lists. Let me get rid of this here and I'm just going to print the list as is. Now, if I want to, for example, pop an item from the list, I could do my list pop and pop out the last value of the list. By default, pop basically gets rid of orpops out the last value in the list. And so this is a mutable object. Remember, in the previous lecture I told you that strings are immutable, meaning you can't change them. Well, lists are mutable. You can change the contents of a list. Okay, so after this line executes, my list will no longer contain the last item, which is five. Okay? Because we're having a party. So this is a new method. This is a method. So let's run this. And there we go. Notice my list now only contains 1234 and got rid of the last element, which was five. Now I can pop at a specific index position. So just like strings, these are zero based index.So the first value is the 0th index position, the second value is one, two, and so on. So if I want to get rid of the first value, If I want to pop out the first value, I could just use a zero index position, and it will get rid of the first value from this list. As a result, when we run this now, we only get the values two, three, four, and five. Now beginners might think that we have to modify and then reassign this back to my list, but that's not necessary. This is not good. We don't need to do this. This is a mutable object, meaning it can be changed, okay? So you don't have to assign it to anything else. You just do pop and it gets rid of the last value. Now, let's say if I want to change something in this list, it's actually pretty straightforward. I could start my list at the 0 position and assign it some value. And this could be a string. So let's say I put an S in here. And so that's one. And now, notice we modified the list object. Now the first item is now an S,and you can see the result down here. The first item is an S. So, as you can see, a list can contain strings as well as numbers and other objects. A given list can contain multiple types of objects,and a given list can also contain another list. So for example, if I was to change this to another list with the words "hello" and "goodbye," now this entire list is going to make its way into the 0th index position. One will be replaced by this entire list. So let's run and there we go. Notice we've got this new list in the first slot, and we've got the rest of the items. Now, we talked about the pop method, and I also showed you how you can change an existing value in the list. There's also something called the append method. So I can actually do this. I can do my list append and append a given value. So let's say I wanted to append the string. This is a sentence. Now this string will be a value that will be appended to the list, okay? And you'll see when I run this notice, there you go,we got the first value, the second value, and so on. And then the last value is that this is a sentence. And one thing I forgot to mention is that the pop method actually returns something, okay? So if I was to, for example, do MyListpop and capture the return value, it's actually going to return the value that was popped up. And this is very handy, right? We don't want to just clear away items on our list without having an opportunity to capture them one way or the other. And so I can pop this last item in the list and save it into a variable called "sentence" or something. And so I can print my list and then later I still have access to the sentence variable, the data. That was the last item. We popped it out. We saved it in the sentence variable. I can always use that later in my program. For example, in this case, I'm going to print the sentence. So let's get going. So this line right here appends to the list this particular sentence. And then this pops it out and saves it into a sentence variable. And this variable, again, we're going over the basics here, but this could be anything. My value, for example, doesn't really matter. And I can use that value anywhere in my program,because once I pop it, I capture it here. And so this is still going to be a modified list because we popped that data. And I can do whatever I want with the captured value, but the append doesn't actually return anything. So if I were to create a variable here called appended and try to print out appended, you'll notice that. Let's run it. It prints none, okay? And none is a specific kind of datatype in Python; it's a reserved word. As a matter of fact, if I type in none with the capital N, notice the syntax highlighting makes it clear that this is a Python reserved word, and noneis a specific kind of data type. So this returns basically, the append basically returns nothing, and we're assigning that nothing object to a pend, and we're printing out that, and that's why we see none. Let me clear some of this up,and let's get rid of this line. And let's get rid of this line as well. And let's get rid of this. So we're appending. Now, if I was to append an array, hereexcuse me, not an array and a list. This is often referred to as an array in other programming languages. If I was to append the values 1099 and 100,for example, these values would be appended to this list,but they would not be appended as an item. Each of these will not be an item on this list. It's basically going to append this entire list inside of this MyList object. Okay? So let's run this. And as you can see, these are the items from the original list. And then this entire list is bedded into the final index position. So if I do a MyList pop now, then my list will no longer have this final item, which is that list. So let's get going. And there we go. Notice how it got popped out. We're back with the original list. Now, there are some handy methods just like pop and append, and one of them is very useful, so you're going to be using it a lot. And that's sorted if you want to sort the contents of this list. Now, at this point, this is already sorted from smallest to largest. If I hit run, you'll notice it's not going to do anything. But if I were to change the order here, Let's make this five and let's make this one. Let's make the first value four, and let's make this two. Now, this is an unordered list using the sort method. It's actually going to modify it. It's going to change the list object. As a result, when we print it, it will be sorted approach to let's hit run. And there we go. 12345. It's sorted because we did the sort method. Now, again, we don't have to capture this in a variable or anything. The sort method doesn't return anything; it modifies the actual object. This is, again, a mutable object, meaning it can be changed so it doesn't in place. It's also known as something known as reverse. So instead of sorting, I could do reverse right here. And now this will flip the order of the items in this list, making two the first value, one the second value, three the current position, five the fourth value, and so on. You get the idea. So let's get going. And there we go. Two, which was the last value, is now the first value. One was the second to last value, now it's the second value and so on. So what you're going to find yourself doing often is doing things like my list dot sort. So we first bring this in sorted order and then, if we want to get it from largest to smallest, we can use the reverse. So let's get this party started. It's no longer from largest to smallest, but from largest to smallest. Now, this doesn't have to be integers. Python has some intelligence built into it. So if I was to change this into strings, let me wrap a quote around each of these items. So these are no longer integers, these are strings. Python will still be smart enough to sort it out. So let's get going. And there we go. 54321 it, first sorted it, then reversed it, and that's why we get this order. same thing with the alphabet. So if I have A-B-D-A ZX, let me just comment out this line again. We can put that hash symbol before it and that line is no longer going to be interpreted by a Python interpreter. As a result, only these lines will be executed. So let's get going. And there we go. It is, in fact, sorted. XZ, by the way, is a shortcut on your keyboard. If you do a command forward slash while selecting an agiven line, it comments it out and uncommonly it. So my cursor is on this line. I do a command, slash it, comment on it, bring my mouseback there, press command again, and it uncommons it. So, just a handy tip there. Now, just like strings, you can also slice lists. So, for example, let's say if I wanted to get from a to z, I could specify the index position. So this is the 0th index position. This is one and from two onward. So I could do two. And this will continue until the end of the string, until the end of the list. So let's get going. And there we go. We get a ZX, just these three values. If I want to get a part of the items, let's say I only want from A to Z, I would dotwo, four, and that will give us these two items. So let's get going. And there we go. We get A and Z. And why did I do four here? Because the last value is noninclusive. That's why we have to, instead of doing two column three, we have to do two colon four to go over, and that's how it captures these two values. You can also use negative integers for slicing. So if I do minus one, it gives me the last value. Let's hit the run. And there we go. We see the x, the last value. So you might be seeing how there are similarities between the way you slice strings and the way you slice lists. Now there's one more function I want to introduce to you, and that is the Len function, len. And that's to basically get the length of a list. So I could do Len, my list and capture that value in an item count variable or whatever, and then I could print out item count down here and you'll see that it gives us the number of elements inside the list and that's 12345 elements. Len also works on strings. I don't know if I covered this, but if I was to, for example, create a string here sentence and give it the following: A-B-C-D-E-F-G-I can actually do a Len on sentence like that and it will give me the item count for the sentence. So let's get going. And there we go. We've got seven characters in this string sequence. So Len is another function that you're going to use a lot to count the number of elements in a string as well as to count the number of elements in a list or some other collection data structure. There's one last thing I want to talk about with regards to lists, and that is the process of merging two lists together. So let me clear up some of this. As a matter of fact, I'll get rid of all of these lines, and we'll have my list and let's just give it some values. It doesn't really matter. We'll give it a couple of numbers. And if I wanted to print the contents of both of these lists, what I could do is I could do my list plus another list like that. And when I hit run, it will print the contents of both of these lists, and it basically prints one big list that contains all the items from the first list and all the items from the second list, but nothing really gets modified in any of these lists, okay? So if I was to print another list, it would still have the original contents, of course, and if I was to print my list, of course, it would only have what my list has. But if I was to combine these together, I could create a new list and we could do my list plus another list. And now the new list is the thing that's going to contain all of the elements. So let's hit. Let's print new lists. As you can see, it has all the elements. We merge the contents of both the lists into this new list. Now, this is different than appending one list to another, right? Let me just quickly review that. If we do new list append and weappend another list after this line runs, we've permanently changed the contents of my list, okay? Because now what's going to happen is my list is going to contain all of these elements plus this element, all right? This entire list will be the sixth element of the MyList, all right? So let's print my list after this line and you'll see. There we go. This entire list has been added as the 6th,rather 6th, element of the original my list. Another list here, of course, still remains. I'm going over these basic principles because, especially if you're a beginner, I want you to be clear. So if we print the contents of another list, that's, of course, going to still have one through five data points, right? But my list has been changed forever. I've got a notice if you hit run at this point. So practise with lists, merge lists together,do sorting, perform reverses, try to slice lists and play around with them. Get a lot of practise because lists are very important data structures in Python that you're going to be using.

2. Assignment: List Assignment

So the objective of this assignment is for you to create another list that contains the contents, specific contents, from each of these lists. And those contents are: I'd like you to get the last three elements from the new list, as well as the last three elements of another list combined together. But the catch is that those elements must be sorted in reverse. First, let me show you exactly what I'd like to see in the end result. So let me formulate the data that I expect to see as the answer. So I expect to see DB and A, and then I want to see three, two, and one. all right? And yeah, of course you can always create a list with this content the way I'm displaying it, but that's not what I want you to do. I want you to use some of the methods that we talked about to create a new list that has this content with slicing, and we talked about the sort, method, and reverse method and so on.You're going to need those. So try this out. Pause the video, then you can resume to watch my solution. Okay, so hopefully that wasn't too difficult. I'm going to comment out this line so that we know what our end result is going to be. And so what we need to do first is do MyList sort, okay? And then after we do MyList sort,we have to do MyList reverse. Okay? So first we get this in alphabetical order from smallest to largest, and then we reverse it to get from largest to smallest. Okay, so let's see what this prints out here. If I print the contents of my list, Now, let's take a look at what that's going to look like. Let's get going. It's now from ZxD. And so I'd like to capture these three values as the first set of values in the final list. And then I need three, two, and one from the second list. So let's create this final list object and I'll assign it the values from my list, which is now sorted and reversed from the index positions zero, one, and two, from the two index position onwards. Okay, so it'll get the last three elements, and then I'm going to do a similar thing for another list. So I'm going to do another listreverse because this is already sorted. Okay? So I just need to reverse another list and then I can combine the final list. So what I'm going to do now is do a plus signhere and do another list and do three, excuse me, two blanks. And that's going to take everything from three onwards to five, and that's going to be the content of the final list. And so now I can print the final list to see if our end result matches what we expected up here. So let's get going. And there you go. Notice we got DBA and then three, two, one.

3. Accessing Elements in Nested Lists

So here I've got a more involved list. Obviously, lists can get as complicated as you want, but we've got a couple of characters in here, we've got a couple of numbers, and then we have this list element as part of the content of this list. And then finally, we have another character. OK, so we've got strings, numbers, as well as otherlists that are contained within this my list object. Now, if I wanted to get, for example, bananaprinted on the screen, how would I do that? Because it's not like it's an element within my list, it's actually an element inside another list that is inside of my list. It's in a nested list. So how would I be able to get a banana? It's actually much simpler than you might think. If we do, for example, my list, we can access it using the index position. So let's see which index position this entire list element is in. So we do the first one, which is 01234 five.So this entire list element is in the 6th index position. So if I do six here and do an extracted list, alright, I pull that and save it into this extracted list. And now if I print this, you'll see that we get the extracted list which contains the fruits: apple, orange, banana. Now, if I want to get a banana,you could probably guess it's pretty straightforward. We just use these brackets to indicate the index position of the banana. And that is going to be number two. And so let's hit the road. And there you go. We get bananas printed on the screen. So that's how you can access elements that are inside of lists that are inside of lists, such as this case of a nested list. Now, this is a longer way of doing it, but I did this to explain to you exactly what's going on. The shorthand of doing exactly this is that all you have to do is take this, my list at the 6th index position, and just reference the indexposition of the element inside of the nested list. So I could just do two here just like that. And so instead of this now saying "extracted list," this would actually be "extracted fruit," for example. That makes more sense because what we're doing here is first identifying the element that we want,which is at index position six. And since that happens to be a list,I can further drill into it by referencing the index position in the nested list. And we get a banana that is going to be saved into this extracted fruit variable. And so we can print that right here. As you can see, bananas got printed. All right. Now, of course, this should be obvious to you by this point. You don't even need a variable. You just take this thing and print it like that. Okay? And that will work. Let's get going. And there we go. And a similar thing would need to be done if we had a list within a list within a list. So I'll just put a comma here, and within this nested list, I can have names of people, for example. So, John and Robert, So why don't you take this as an assignment? I'd like you to remove Robert from this list. You can pause the video and try this out on your own, and then resume to watch my solution. Okay, welcome back. Hopefully, this was very simple. You've already set it up the way we need to. All we have to do is add an extra set of brackets here, since we're now going into the list that's in the list that's in the list. So the third nested list, which is right here. And so now I have to reference Robert's index position. So that's the second element in the list. So what does that mean? The index position is one like that. So now, whenever I run, I get to print Robert to the screen. Okay, so hopefully you get the idea. Practice with this. Your lists are hardly going to become this complex,because that's usually a sign of bad code. When you have lists that are super complex with nested lists within lists within lists, that's usually a code smell, meaning the code that was written. It wasn't written with good design. Good design means keeping things simple. But you have to be able to work with data structures in all different ways to use a programming language effectively. And that's why I showed you how you can access these nested portions of a list. Now, can you modify the contents of a list that is within a list that's within a list? Of course, just like you would modify the contents of any list. right? And we talked about this earlier. You can assign, for example, the second item to be some other letter. So let's do that really quickly. My list at the index position of Let's change C here. So that's index position two. Let's change that to "computer. It doesn't really matter. It could be anything. And so now we have changed this list. It's been modified. So now if I print the contents of the entire list, let's just get rid of all these and just print my list. Let's hit the run. And there we go. Notice it's been changed to A, Band instead of C's, computer. And then the rest of the contents are still the same. So why don't you try this assignment I'm about to give to you? Change Robert to Joe. Right? Change Robert's name to Joe. So pause the video, try that out, and then you can resume to watch my solution. Okay, welcome back. Hopefully, that wasn't difficult at all. We are going to do something very similar to what we did before. So let's first access Robert. So we do my list at the 6th index position and then we do it at the second index position. And then at the index position,one is where we target Robert. And at that point, let me change. As a matter of fact, we don't need this statement in print statement.We're going to put this on its own line. So we're going to change Robert's name to Joe's like that. Joe has taken the place of Robert on my list indefinitely. And so now if I print my list, that's hit run. And there you go. You can see that Robert is no longer part of the list. Joe has made its way into that nest.

4. Finding Index Positions in Lists and Counting Duplicates

This is the index method. So if I wanted to, for example, get the index of a given element in the list, I could dot index, right? And in the parentheses is where I specify which object do I want the index of, which element that's in the list do I want the index position of. So let's say I haven't seen this list and I'm looking for the character c. I could just put c in here like that. And what this is going to return is it's going to return the index position of where c is in this list. So I'm just going to put in what I'm going to call IDX underscore POS, which stands for index position. This is an integer. So now that I have that index position, I can, of course, just print it or do various things with it. index position like this. And so, of course, that's going to give me the index position number two, because cis is at the index position two. That's one method I want to talk about. Another method is known as counting. And so, let me clear this up and let me add a couple of more data points in here. So let's say we have another c and then we have another c. We have multiple CSs in here. I can use the count method on this list to get the number of times c appears in this list. So I could do MyList count, and then in the parentheses I'm going to pass in the particular character that I would like to count, and that's c. And this is also going to return an integer. So I'll say c count. All right, so the variables, you can call them, of course, anything. So I'm going to print what c count is going to equal, and that's, of course, going to be the number of times c occurs in this list. And that's three times. So let's hit "run," and there we go. We get three. So you're going to see later, as we move forward in this course, how you can utilise handy methods such as count and index. Oftentimes, you don't see the contents of the list unless you print it out or something. And you can have various code-bases where you'd have to go through them and print them out if you need to make changes. But a lot of times, if you know the data that you're searching for, you can always try to get the index position of that data by just using the index method and passing the data that you're looking for. And it will return you exactly where that data is in the list. So that's it. I'm not going to talk more about lists. We talked a lot about lists, but trust me, the knowledge that you've gained so far is going to carryover to some of the other data structures that we're going to look at in the next lesson. I'm going to introduce tuples, which is another data structure that is similar to lists but cannot be modified. Tuples cannot be modified, whereas lists can be I introduced you to the word mutability. So lists are mutant mutable,meaning they can be changed. The contents of a list can be changed,whereas for a tuple data structure, the contents of a tuple cannot be changed. So tuples are immutable.

5. Tuples in Python

So you've seen that when I create a list and it has some content, such as one, two, three, or whatever, I can actually modify the contents of this list by accessing the index position of what I want to modify. So in this case, if I want to modify two to something else, I would use the index position one and say that I want the new value here to be inside of this list. So, if I print my list at this point, it will, of course, contain new values. My list object has been changed forever after this line. But tuples are a different type of data structure that cannot be changed. That's the primary difference. The way you access the elements in a tuple is exactly the same as how you would access elements in a list. You can use slicing to get parts of elements from a tuple, but the main difference is that you cannot modify a tuple. So let's talk about what a tuple looks like. So all you do with a tuple is, instead of square brackets, you use parentheses, okay? And now this is a tuple. So obviously we need to rename this because it doesn't make sense to call it a list. So we'll say it's my triple, and so I can access the content. Let me give you some more data here. I'll give it some string data and some data, and then I'll also put a list inside of here. So a tuple that contains various elements has integers, strings, and a list. I can access these elements in the tuple in a similar way to before. So let's, for example, print the contents of this list right here. So first I have to identify the index position of where that list is. So that would be the 0th index position. One, two, three, and four are the index positions of where the list is. So I could just do my tuple at four, okay, and run it. And there you go. We got that item. Now, if I want to, for example, try to change these words to something else, let's try that, and I'll show you why you can't do it. So let's do tuple and access that element. So that's the third index position that's going to give us this string. Now let's try to change it, and you're going to see the error that comes up. So I'll change this to other data, so I don't even have to print anything. This is enough for the interpreter to throw an error. And as a matter of fact, if you check the bottom left all the way to the bottom left in tiny letters in your Pie charm editor, when you highlight this line, it's going to say that tuples don't support item assignment. Okay? As a matter of fact, it's highlighting this entire line on its own because it's giving us an error. It's giving us a warning before we compile or run anything. So let's run it so you can see the error. And there we go. We get the error and it says, "tuple object does not support item assignment." Now, you might be wondering, can I change one of the list items that are inside of a tuple? So we've got this list, right? That's inside of a tuple. Could I change the contents of the list? And if you guessed, yes, you're right. That's what makes Python such an easy-to-use language and so powerful. So let's refer to the index position four. That's where the list is. So, index position four. And let's say that I wanted to change the last value from three to something else. So I'll do that. As a result, we can access the inexpension zero, one, and two. So three are on the list at the second and exposition. So we'll choose two that target this number. And so now I can change this value to be something else with a new value. Alright? And so let's print this, my tuple. So now we're going to print my tuple. Let's see if this works. Let's get going. And there we go. Notice it works. We were able to modify the list that resides within the tuple, but we cannot modify the entire list. I couldn't do this. So here's a tuple. This refers to that actual list. I couldn't assign it to some other list,like four, five, or six. I can't do that. If I run this, of course it's going to give me the same error. And PyCharm is smart enough to know that when you're accessing the raw index position of a tuple and trying to change it, it's smart enough to know that this is an error. That's why it highlights it. But when you access a nested element in a tuple, and that nested element is changeable, like a list, then it doesn't complain. All the necessary methods that you would use on a day-to-day basis are the same in a tuple. Now, lists have far more methods associated with them that you can use, but tuples don't have as many, but the necessary ones are there. For example, I just talked about the count method in the previous video, so I could do an account and check to see how many occurrences of this data there are in this tuple. all right? And that's going to give me the count, and then I could print that count so you can see what the result is. So it's, of course, going to just show one right here. But if I had multiple occurrences of this word, let's put another comma in there. Now we have three occurrences of this data. So now it's going to give me a count of three. Whoops. I got an error because I needed a comma at the end of this. There we go. Now let's hit the road again. And there we go. It gives me a three. I can slice tuples like I do lists. So, for example, if I want to get these three elements right, I could domy tuple and target those three elements. So zero, one, two. And so we start from the third index position, and then we slice all the way up to four, five, and six. So we put six here, and that's going to give us these three elements. Okay, again, I'm giving a six because the second value of the range that you're going to is noninclusive. That's why we have to go one over. And so let's run this. And there we go. We get some data and noticethis actually returns a tuple, right? That's what this returns to. If I was to, instead of printing it out, Any slicing that you do with a list returns a list. Any slicing you do with a tuple returns a tuple. So I'll just say structural to indicate that this is the strings or whatever. And so I can print struple. And this is, in fact, going to be a tuple. All right, so let's hit the road. And there we go. This is our tuple. And you can use the type method. I introduced you to the type method that I introduced to you just to make sure that this is in fact the tuple. I could just do a type around it. This is actually known as a type function, okay? And this will give us a type. So let's run this and notice the type istuple or tuple, however you want to pronounce it. Let's go back here and let's target the fourth index position or wherever this list is. So that's 01234 five. It starts at the 6th index position. Now, at the 6th index position, if I want to save this and I'll say extracted, let's see what extracted is, right? So we extract the actual list right here. So let me get rid of this type. And so we're going to print the extract, whatever that is. And so let's run it. Notice it returns a list. Okay? So Python is smart enough to know not to wrap parentheses around it. It wraps brackets because this is in fact a list. So it returns the correct data with its data type. So again, if I was to do a type function around this to check what type of data this is, the extracted data, it's going to show a list. Let's run. And there we go. Notice it says "list." So play around with tuples. It's very similar to a list, except it's not mutable. So I can do my tuple dot. And here are the various methods that you can use, okay? The main ones are count and index. And there are some other ones down here which we might get to.

ExamSnap's Python Institute PCAP Practice Test Questions and Exam Dumps, study guide, and video training course are complicated in premium bundle. The Exam Updated are monitored by Industry Leading IT Trainers with over 15 years of experience, Python Institute PCAP Exam Dumps and Practice Test Questions cover all the Exam Objectives to make sure you pass your exam easily.

Comments (0)

Add Comment

Please post your comments about Python Institute Exams. Don't share your email address asking for PCAP braindumps or PCAP exam pdf files.

Add Comment

Purchase Individually

PCAP  Premium File
PCAP
Premium File
141 Q&A
$43.99 $39.99
PCAP  Training Course
PCAP
Training Course
57 Lectures
$16.49 $14.99
PCAP  Study Guide
PCAP
Study Guide
320 Pages
$16.49 $14.99

Python Institute Certifications

Top Python Institute Exams

UP

LIMITED OFFER: GET 30% Discount

This is ONE TIME OFFER

ExamSnap Discount Offer
Enter Your Email Address to Receive Your 30% Discount Code

A confirmation link will be sent to this email address to verify your login. *We value your privacy. We will not rent or sell your email address.

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your e-mail address below to get started with our interactive software demo of your free trial.

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.