what is a List in Python?

NetworkChuck · Beginner ·📰 AI News & Updates ·4y ago

Key Takeaways

The video covers the basics of Python lists, including creation, modification, indexing, and negative indexing, using tools such as square brackets and the print function.

Full Transcript

this is a python list and they are ridiculously powerful and pretty fun to play with so in this episode get your copy ready because we're covering the what and why of this incredible data structure and how it will open up a whole new world of python goodness you ready let's dive in [Music] okay here we go one more sip of coffee let's get started so we covered a variable we create it assign it a simple piece of data and we can use it everywhere in our python script it's awesome but let me show you when it's not awesome because you and i we're going on a camping trip what you didn't know yeah come on but first we need our python lab up and running let's get that running real quick so check that link below in the description to get access to a free python right now now while your lab is loading up let me tell you about the sponsor of this entire series and why it can be free here on youtube it pro tv they are by far my favorite it training provider they are what i use to keep myself up to date on all the latest things in it from automation which come look at all these automation things to all things cisco holy crap like all the cisco stuff encore devnet ccna and of course python they have everything you need to go crazy in python right now if you just cannot wait and you want to go further this is it seriously check it out link below but that's not all that's like an infomercial but seriously they do have more than training they have hey look practice test to get you ready for those crazy exams or how about a lab to actually practice what you're doing look at all these labs so if you want to learn it like me check it out link below use code network chuck and get 30 off forever seriously they are awesome so yeah your lab should be up and loaded let's keep going so we're going on a cappy trip and like all campy trips we need a ton of stuff 10 sleeping bags raspberry pies flash drives ethernet cables marshmallows just things like that right the essentials now here's what i need you to do i need you to create a variable let's name it camp underscore stuff and i want that to equal all the supplies we have to bring go ahead and do it right now in fact we'll we'll do it together right now let's do it so using the knowledge we learned so far in this series we might do this camping stuff variable created let's have it equal something equals and you know we'll just start typing in the stuff 10 sleeping bags jump forward in time and have it already there and if we print the variable camping stuff and we run our code go and click around at the top there that works but it doesn't because right now this is one big fat gargantua string it's bloated it's ugly i hate it it's really hard to use and honestly kind of stupid we can do better instead of storing all of our data into one big fat string we can try out something really cool something amazing something fun something life changing something called a python list let's do this which honestly makes total sense because we're trying to make a list of things we got to bring hey python list it just it just all adds up it's all coming together here so i'm going to create a new variable called camping underscore list just like before but here comes the craziness don't worry i'll walk you through it brackets that's the game changer right there buckle your seat belt coffee break and time to build the list you can step forward in time just go ahead and jump jump forward in time done that was exhausting need a coffee break okay and also i want you to do the same thing so i know it's a lot of typing whatever just just do it it's not too hard now this right here is a python list and it's so awesome for so many reasons way better than this idiot over here and i will go into why but first let's get a really nerdy definition on what a python list is go ahead bernard a python list is an ordered and changeable collection of data objects unlike an array which can contain objects of a single type a list can contain a mixture of objects now first before we talk about how awesome this is i want you to print the type of data this camping list variable is just go ahead and print it real quick the type do you remember how here's how we do it print using our print function and then in the print function we use our type function and i'll just print the type of the camping list because i don't want to lie to you i got to prove to you that this is a data structure called list let's go and run the code run and there it is suckers i told you a data class a data structure called list oh man i'm telling you this is going to open up so many doors to python coding we're gonna spend a lot of time like actually playing with this okay anyways i'm excited for you let's keep going i'm gonna delete the stuff real quick and we'll talk about what the junk is going on with this stuff up here now you can recognize a list because it'll always have opening and closing brackets bam and bam it has to have those that's what a list needs and then inside that list is where we have our data and notice how the data is separated by a comma there they all are now real quick let's bask in the awesomeness of a list so up here right is a big ugly strings one big fat string down here we got a bunch of individual strings like how many we have here count for me i'll do it we have 10 individual pieces of data inside this one variable so much better right you're probably thinking well why is it so much better we'll get to it we'll get to i'll show you a use case here but can i tell you something else cool about a list it can have more than just string data types inside of it let's try it out actually so let's create a new list and i want to name this camp underscore site and actually you know i want you to do this and here's the data i want you to put in there it'll be like campsite information first the name of our camp will be or the campsite will be crystal lake sounds perfectly safe and then of course we'll need our site number which will be 404 and then they expect a temperature of that day it's going to be a balmy 89.3 degrees and then one more piece of data is this place dangerous true or false um it's going to be true it is dangerous so make our campsite list go for it now pause on pause coffee break let's go ahead and do it to make our list we'll do an opening bracket and our amazing python replit here will make it for us first data crystal lake is a string cool we got that comma space you space is optional but it's best practice do a space just because it looks prettier and we're all about pretty next piece of data 404 that's going to be a number an integer right done just like that no quotes space comma space temperature 89.3 degrees fahrenheit people i'm i'm in america get over it and then finally is it dangerous yeah true cool so how amazing is this here in this list we have four different types of data right we got a string we have an integer a float and a boolean i don't know why i say it like that i'm sorry so now i think you're starting to see how amazing the lists are they can hold multiple pieces of data and different types of data doesn't that make you just a little bit excited if it doesn't man sip some more coffee and then come back to me okay rewind now here comes the killer killer the killer part of list i i talked about this if you remember what professor bernard said they are ordered what does that mean i'll explain it by showing you two amazing things you ready for this okay here we go let's say that out of our camping list i need to assign who's going to bring what on the camping trip so for example me i'm going to bring coffee duh right you saw that coming and you you're coming right yeah you're coming you're gonna bring marshmallows because they're delicious here's how i can assign that data with a list oh it's so powerful watch this this is gonna blow your mind i'll create the variable me and have that equal watch this the list camping list and then do some brackets and then in those brackets i'm going to put the number four what just happened what am i doing watch i'm going to print me the variable me let's run it run did you see that sorry i know it seems like i'm over exaggerating but i'm really this excited about it i'm not kidding right here it printed just coffee just that one string that one piece of data in our list now go ahead and do the same thing for you do you remember what you're bringing go ahead and do it real quick pause the video do the same thing for you and then print out that one item go unpause okay how would you do that create the variable u have that equal camping list and then brackets let's see if you could figure this out you were bringing marshmallows which is the last in our list which means marshmallows will be nine did you get that right i'll explain why it's nine in here in a second but let's go and print it out i'll put it below me printing younow and run coffee and marshmallows yes so when i say the list is ordered or you might see people talking about it being in a in a sequence or sequenced when you put your stuff that data into your list the order you put it in there it stays the same which is great because we can do things like reference the individual items in that list so when it says ordered when it says sequence it just means hey that stuff you put in there it's in that same order all the time unless we change it which we'll talk about later but then real quick hold on why was coffee four because if we're looking at our list here we got one two three and then four raspberry pi is four coffee should have been five right no we're dealing with computers and computers have to be difficult sometimes you might realize and remember and know that computers always start counting with zero so what they do so test would be zero then one two three bringing us at four with coffee which is why marshmallows instead of being ten would actually be nine so in an a list with ten items your last number will always end up being nine just keep that in mind that that always messes me up whenever i'm dealing with list so i just have to like manually consciously remember it it's fine though but this right here what we did here is super powerful and it will become more apparent how powerful that is um when we do something later i can't tell you yet i want to tell you but you have to wait but diving deeper into that you'll also see lists referred to as um indexed that's kind of just another way of saying ordered ordered sequence indexed and when i say indexed it just means that each item in our list is assigned a number it's just it's just the order it's in and when we reference a list like this we're calling out the index of that item we're going hey ah here's our camping list item number four pull it out that's what we're doing how cool is that and you probably already noticed that when we are trying to reference a item in a list when we index it we use brackets now quick coffee break i want to cover one more thing that might break your brain but can we just do it real quick it's going to be fun it's really fun i promise coffee it has to do with indexing we're going to index one more time and actually i'm going to change you real quick i'm going to change you you're you're variable you you're still bringing marshmallows but i'm going to change the way i find marshmallows with that list watch this i'm going to change that 9 this is weird negative one now what do you think is going to happen when we print this let's try it out let's run our code hey look it stayed the dang same why well that's called a negative index it does come in handy but essentially what you're doing is you're counting in reverse so instead of starting up here we're starting all the way back here so the very last item in our list would be negative one and you're probably thinking well chuck n uh should be negative zero it's not just isn't you have negative zero it's impossible anyway sorry i didn't mean to get a little angry with you i'm just kidding i wasn't but that's a handy way to access the last item in your list you're probably thinking well that's kind of stupid why would we ever do that well you know sometimes you may not know how big a list is and other times there might be a very good reason they'll access the last item in a list you'll find out that later but let's try it one more what happens if we do go and change it to negative two negative two let's try it out run our code bam beard oil it's now the second to last item in the list and real quick i can't believe we haven't done this yet shame on me let's go and print the entire list at the very end here just print camping list run cool so when we print the camping list guess what it looks just like our list that we have there let me scroll up so you can see it the only difference is that it uses single quotes instead of double quotes it breaks our standard it's okay though we'll forgive it now i told you didn't i i wasn't lying python lists are really fun and really powerful now you probably understand the power they have even just now but you have no idea what's coming up what you can do with these is gonna you know it's just gonna be mind-blowing so i know you can't wait go ahead and move forward to the next episode now if you're watching on youtube it might be like well it's not here i know i create them in batches and i release them week by week sometimes month by month and maybe year by year hush uh no i do release them frequently but they do have them in advance on network chuck academy which you can check out in the link below also in nerdchuck academy is extra practice on the stuff we're covering so if you're like hey i get this i understand it but i want to play with it a bit more first play with it yourself just do more of it but also i'm going to have some exercises some labs and some quiz questions along with all of this at network chuck academy so check it out link below oh and also hey i gotta ask you a question have you hacked the youtube algorithm today let's make sure you do hit that like button notification bell comment subscribe did i hit everything yes you gotta hack youtube today ethically of course yeah that's all i got and also again a huge shout out to the sponsor of this entire series it pro tv again if you're trying to get into it if you want to learn anything in it get a certification or just learn a skill dude they're the place to go again if you use my code network chuck you get 30 off forever don't miss that deal it's not going away because i said forever but you still just don't waste time don't don't wait till tomorrow do it right now you can start learning right now you have a career in a month just do it i'll catch you guys later i'm done talking coffee break [Music] [Applause] [Music] you

Original Description

This video was originally sponsored by ITProTV. We’ve since launched NetworkChuck Academy, our own place to learn IT: https://ntck.co/NCAcademy FREE Python lab: https://ntck.co/pyep7 🔥🔥🔥🔥Extra Labs and Quizzes at NetworkChuck Academy: https://ntck.co/python In this installment of NetworkChuck’s Python series, Chuck is going to show you how to use Lists in Python. You will learn how to create your own Python List and also how to Print out the items from your Python List that you are supposed to bring while you prepare for your camping trip! 🔥🔥Get access to all of my courses plus more by joining the NetworkChuck Academy!: https://ntck.co/NCAcademy **Sponsored by ITProTV SUPPORT NETWORKCHUCK --------------------------------------------------- ➡️NetworkChuck membership: https://ntck.co/Premium ☕☕ COFFEE and MERCH: https://ntck.co/coffee Check out my new channel: https://ntck.co/ncclips 🆘🆘NEED HELP?? Join the Discord Server: https://discord.gg/networkchuck STUDY WITH ME on Twitch: https://bit.ly/nc_twitch READY TO LEARN?? --------------------------------------------------- -Learn Python: https://bit.ly/3rzZjzz -Get your CCNA: https://bit.ly/nc-ccna FOLLOW ME EVERYWHERE --------------------------------------------------- Instagram: https://www.instagram.com/networkchuck/ Twitter: https://twitter.com/networkchuck Facebook: https://www.facebook.com/NetworkChuck/ Join the Discord server: http://bit.ly/nc-discord 0:00 ⏩ Intro 0:26 ⏩ [“Let’s”, ”Get”, “Started!”] 0:44 ⏩ The BEST IT training! 1:50 ⏩ Creating your camping list variable! 2:44 ⏩ It’s all coming together!(Kronk voice) 3:18 ⏩ What is a Python list? Ft. Bernard Hackwell 5:24 ⏩ Let’s make our campsite list!(it might be a little dangerous!) 6:42 ⏩ What are you bringing on the trip? 7:35 ⏩ Print out what you are bringing! 8:21 ⏩ Don’t forget the 0! 9:50 ⏩ Time to break your brain! 10:06 ⏩ What the junk is a negative index? 11:05 ⏩ I forgot to print the whol
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from NetworkChuck · NetworkChuck · 0 of 60

← Previous Next →
1 Network Chuck
Network Chuck
NetworkChuck
2 Should I Use a Brain Dump on my CCNA/CCNP/MCSA Exam?
Should I Use a Brain Dump on my CCNA/CCNP/MCSA Exam?
NetworkChuck
3 7 CCNA CCNP Study Tips for the New Year - 2017!!
7 CCNA CCNP Study Tips for the New Year - 2017!!
NetworkChuck
4 CUCM Calling Search Spaces and Partitions: Explained with Star Wars
CUCM Calling Search Spaces and Partitions: Explained with Star Wars
NetworkChuck
5 CCNA or COLLEGE? - Become a Network Engineer
CCNA or COLLEGE? - Become a Network Engineer
NetworkChuck
6 How to Stop Procrastinating and Study for Your CCNA CCNP
How to Stop Procrastinating and Study for Your CCNA CCNP
NetworkChuck
7 Am I Smart Enough to Be a Network Engineer? - CCNA | CCNP Study
Am I Smart Enough to Be a Network Engineer? - CCNA | CCNP Study
NetworkChuck
8 CCNA or Python? | Should I Become a Network Engineer or a Programmer?
CCNA or Python? | Should I Become a Network Engineer or a Programmer?
NetworkChuck
9 CompTIA or Cisco? - Should I get the CompTIA A+/Network+ OR the Cisco CCNA/CCENT - Microsoft MCSA?
CompTIA or Cisco? - Should I get the CompTIA A+/Network+ OR the Cisco CCNA/CCENT - Microsoft MCSA?
NetworkChuck
10 CBT Nuggets GIVEAWAY!! - Get Your CCNA, MCSA, VCP, Security+
CBT Nuggets GIVEAWAY!! - Get Your CCNA, MCSA, VCP, Security+
NetworkChuck
11 3 Cisco CLI (Command-line) Hacks (CCNA) + CBT Nuggets WINNER ANNOUNCEMENT!!
3 Cisco CLI (Command-line) Hacks (CCNA) + CBT Nuggets WINNER ANNOUNCEMENT!!
NetworkChuck
12 Programmers Becoming Network Engineers? - Collab with SimpleProgrammer
Programmers Becoming Network Engineers? - Collab with SimpleProgrammer
NetworkChuck
13 Learning Python is HARD!! - CCNA | CCNP Network Engineer
Learning Python is HARD!! - CCNA | CCNP Network Engineer
NetworkChuck
14 You CAN Learn Python - 10 WINNERS!! - CCNA | CCNP Network Engineer
You CAN Learn Python - 10 WINNERS!! - CCNA | CCNP Network Engineer
NetworkChuck
15 Is it still WORTH IT to become a Network Engineer? | CCNA CCNP
Is it still WORTH IT to become a Network Engineer? | CCNA CCNP
NetworkChuck
16 Should I Learn LINUX with the CCNA | CCNP? - Network Engineer
Should I Learn LINUX with the CCNA | CCNP? - Network Engineer
NetworkChuck
17 Am I Too OLD to Become a Network Engineer? Study for CCNA | CCNP?
Am I Too OLD to Become a Network Engineer? Study for CCNA | CCNP?
NetworkChuck
18 How Much Money Do Network Engineers Make? - CCNA | CCNP
How Much Money Do Network Engineers Make? - CCNA | CCNP
NetworkChuck
19 How Long Does It Take to Become a Network Engineer? - CCNA | CCNP
How Long Does It Take to Become a Network Engineer? - CCNA | CCNP
NetworkChuck
20 Network Engineer or Systems Engineer? CCNA or MCSA? VCA?
Network Engineer or Systems Engineer? CCNA or MCSA? VCA?
NetworkChuck
21 CCNA Exam: 2 Exams or 1? - ICND1 (CCENT) + ICND2 or CCNA Composite?
CCNA Exam: 2 Exams or 1? - ICND1 (CCENT) + ICND2 or CCNA Composite?
NetworkChuck
22 I am officially a CBT Nuggets Trainer!! - NetworkChuck
I am officially a CBT Nuggets Trainer!! - NetworkChuck
NetworkChuck
23 7 CCNA CCNP Study Tips for the New Year - 2018!! w/ Keith Barker CCIE
7 CCNA CCNP Study Tips for the New Year - 2018!! w/ Keith Barker CCIE
NetworkChuck
24 Is NetworkChuck Over!?!?!
Is NetworkChuck Over!?!?!
NetworkChuck
25 Hack a Cisco Switch with a Raspberry Pi - CCNA Security - CCNP Security - Network+
Hack a Cisco Switch with a Raspberry Pi - CCNA Security - CCNP Security - Network+
NetworkChuck
26 STOP Buying IT Certification Books - CCNA | CCNP | A+ | Network+
STOP Buying IT Certification Books - CCNA | CCNP | A+ | Network+
NetworkChuck
27 I'm going to Cisco Live!!! - CiscoLIVE 2018 Orlando
I'm going to Cisco Live!!! - CiscoLIVE 2018 Orlando
NetworkChuck
28 How to become a DEVOPS Engineer feat. Shawn Powers | Linux+ | LPIC-1
How to become a DEVOPS Engineer feat. Shawn Powers | Linux+ | LPIC-1
NetworkChuck
29 Moving my HOME NETWORK to a DATA CENTER w/ DMVPN - CCNA | CCNP
Moving my HOME NETWORK to a DATA CENTER w/ DMVPN - CCNA | CCNP
NetworkChuck
30 The FUTURE of Information Security Engineers - Cisco Security Automation (DNA CENTER)
The FUTURE of Information Security Engineers - Cisco Security Automation (DNA CENTER)
NetworkChuck
31 Network Engineers and AWS (Amazon Web Services) FEAT. Anthony Sequeira | CCNA | CCENT
Network Engineers and AWS (Amazon Web Services) FEAT. Anthony Sequeira | CCNA | CCENT
NetworkChuck
32 Do You Need IT Certifications to Get Started in IT? ft. Jeremy Cioara
Do You Need IT Certifications to Get Started in IT? ft. Jeremy Cioara
NetworkChuck
33 What's next for NetworkChuck? *UPDATE* | CCNA | CCNP | Network Automation
What's next for NetworkChuck? *UPDATE* | CCNA | CCNP | Network Automation
NetworkChuck
34 HOW to Start Coding (RIGHT NOW!) as a Network Engineer - ICND1 | CCNA CCNP & Intent-Based Networking
HOW to Start Coding (RIGHT NOW!) as a Network Engineer - ICND1 | CCNA CCNP & Intent-Based Networking
NetworkChuck
35 6 STEPS to IT CAREER SUCCESS!! - ft. Kevin Wallace | CCNA | CCNP | CCIE | Network+
6 STEPS to IT CAREER SUCCESS!! - ft. Kevin Wallace | CCNA | CCNP | CCIE | Network+
NetworkChuck
36 What is SD-WAN? say GOODBYE to MPLS, DMVPN, iWAN... w/ SDN, Cisco and Viptela
What is SD-WAN? say GOODBYE to MPLS, DMVPN, iWAN... w/ SDN, Cisco and Viptela
NetworkChuck
37 What if you forgot EVERYTHING? - Re-Learning IT after MEMORY LOSS w/ Shawn Powers | Linux | CCNA
What if you forgot EVERYTHING? - Re-Learning IT after MEMORY LOSS w/ Shawn Powers | Linux | CCNA
NetworkChuck
38 I (FINALLY!) Scheduled Cisco CCNP Certification Exam TSHOOT | 300-135
I (FINALLY!) Scheduled Cisco CCNP Certification Exam TSHOOT | 300-135
NetworkChuck
39 NetworkChuck 10 Days of Christmas 2018 - CBT Nuggets | David Bombal | Kevin Wallace (and more!!)
NetworkChuck 10 Days of Christmas 2018 - CBT Nuggets | David Bombal | Kevin Wallace (and more!!)
NetworkChuck
40 How To get a JOB with a CCNA (Network Engineer) |  CCNA Routing and Switching
How To get a JOB with a CCNA (Network Engineer) | CCNA Routing and Switching
NetworkChuck
41 The ONE Skill You NEED in IT - Information Technology
The ONE Skill You NEED in IT - Information Technology
NetworkChuck
42 Should I start Learning AWS?? - NetworkChuck AMA - Ask Me Anything
Should I start Learning AWS?? - NetworkChuck AMA - Ask Me Anything
NetworkChuck
43 Using Arduino, Raspberry Pi and Python to Monitor Cisco Router - #DEVNET CCNA
Using Arduino, Raspberry Pi and Python to Monitor Cisco Router - #DEVNET CCNA
NetworkChuck
44 Fighting IMPOSTER SYNDROME in Information Technology - Network Engineer | System Engineer | CCNA
Fighting IMPOSTER SYNDROME in Information Technology - Network Engineer | System Engineer | CCNA
NetworkChuck
45 Planning for 2019 - Information Technology Goals - CCNA | AWS | MCSA
Planning for 2019 - Information Technology Goals - CCNA | AWS | MCSA
NetworkChuck
46 CompTIA or Cisco? - Revisiting CCENT vs Network+ in 2019 | CCNA | MTA | MCSA
CompTIA or Cisco? - Revisiting CCENT vs Network+ in 2019 | CCNA | MTA | MCSA
NetworkChuck
47 5 Reasons You Shouldn't Become a Network Engineer | CCNA | Information Technology
5 Reasons You Shouldn't Become a Network Engineer | CCNA | Information Technology
NetworkChuck
48 No Future for Network Engineers? - CCNA | CCNP
No Future for Network Engineers? - CCNA | CCNP
NetworkChuck
49 What is a VMware Engineer? | VMware Certified Professional - VCP | MCSA | CCNA
What is a VMware Engineer? | VMware Certified Professional - VCP | MCSA | CCNA
NetworkChuck
50 you didn't win...
you didn't win...
NetworkChuck
51 Let's QoS My Home Network - LIVE NUGGET (Quality of Service) - CCNA - CCNP Collaboration
Let's QoS My Home Network - LIVE NUGGET (Quality of Service) - CCNA - CCNP Collaboration
NetworkChuck
52 I PASSED THE TSHOOT EXAM!! - CCNP TSHOOT (I also failed)
I PASSED THE TSHOOT EXAM!! - CCNP TSHOOT (I also failed)
NetworkChuck
53 David Bombal and NetworkChuck - This is IT! EP 1 | Azure, CiscoLIVE, Devnet
David Bombal and NetworkChuck - This is IT! EP 1 | Azure, CiscoLIVE, Devnet
NetworkChuck
54 CCNA Lab in the Azure Cloud for FREE! - GNS3 Setup in Microsoft Azure
CCNA Lab in the Azure Cloud for FREE! - GNS3 Setup in Microsoft Azure
NetworkChuck
55 Get your CCNA in 2019
Get your CCNA in 2019
NetworkChuck
56 CCNA Cyber Ops vs CCNA Security
CCNA Cyber Ops vs CCNA Security
NetworkChuck
57 WI-FI 6, Why it's the BIGGEST update to Wi-Fi EVER! - 802.11ax
WI-FI 6, Why it's the BIGGEST update to Wi-Fi EVER! - 802.11ax
NetworkChuck
58 2 Steps to Getting Started in Networking (and IT!) | CCENT | CompTIA A+
2 Steps to Getting Started in Networking (and IT!) | CCENT | CompTIA A+
NetworkChuck
59 HACK your IT Study Habits - CCENT - CCNA - A+ | Atomic Habits
HACK your IT Study Habits - CCENT - CCNA - A+ | Atomic Habits
NetworkChuck
60 Is MPLS DEAD?!? w/ Keith Barker and Jason Gooley | CCNA CCNP CCIE
Is MPLS DEAD?!? w/ Keith Barker and Jason Gooley | CCNA CCNP CCIE
NetworkChuck

This video teaches the basics of Python lists, including how to create, modify, and index them, and provides practical steps for working with lists in Python. It covers the fundamentals of lists, including their ordered and changeable nature, and how to access items using indexing and negative indexing.

Key Takeaways
  1. Create a variable called `camping_list` and assign it a list of items
  2. Add elements to the list using square brackets `[]` and commas
  3. Print the list to see its contents
  4. Print the type of data a list variable is using the print function and the type function
  5. Create a new list and add data to it, including different types of data such as strings, integers, floats, and booleans
  6. Reference an item in a list using its index
  7. Print the item at a specific index in a list
  8. Change the index to a negative number to access the last item in the list
💡 Python lists are ordered and changeable collections of data objects that can be indexed and modified, making them a fundamental data structure in Python programming.

Related AI Lessons

Chapters (13)

⏩ Intro
0:26 ⏩ [“Let’s”, ”Get”, “Started!”]
0:44 ⏩ The BEST IT training!
1:50 ⏩ Creating your camping list variable!
2:44 ⏩ It’s all coming together!(Kronk voice)
3:18 ⏩ What is a Python list? Ft. Bernard Hackwell
5:24 ⏩ Let’s make our campsite list!(it might be a little dangerous!)
6:42 ⏩ What are you bringing on the trip?
7:35 ⏩ Print out what you are bringing!
8:21 ⏩ Don’t forget the 0!
9:50 ⏩ Time to break your brain!
10:06 ⏩ What the junk is a negative index?
11:05 ⏩ I forgot to print the whol
Up next
Tasty Weird! Book 16 by Anh Do · Audiobook preview
Google Play Books
Watch →