Lists - Python | Lesson 10 (Free Coding Bootcamp)

preview_player
Показать описание
Free Coding Bootcamp - Go from Zero to Software Engineer

This Bootcamp will follow the roadmap covered in this video

In this lesson, we go over lists and how we can use it to store more than 1 item(s).

Note: Order matters for code!

🔥 Drop a comment to help the algorithm :)
👍 Subscribe to get notifications for the next video

-----------------
😎 Resources
-----------------
👯 TikTok
📸 Instagram
💬. Join the Discord
📜. FREE Resume Template
📕. FREE Note taking template

-----------------
👾 Important Videos
-----------------

-----------------
🧑🏻‍💻 About Me
-----------------
I am a full time iOS engineer, with over 7 years of programming experience.
My goal is teach you the bare minimum necessary to break into tech ASAP.

Learn more about my programming journey

I offer 1 on 1 mentorship as well, feel free to DM me on discord

#coding #bootcamp #learntocode #codewithvincent

-----------------
Chapters
-----------------
0:00 Introduction
1:05 Drawing a list
2:37 Coding time
4:10 Invalid index error
5:06 len() function
5:54 Recap
Рекомендации по теме
Комментарии
Автор

Thank you so much, I had been always afraid of this topic at school because never understood it and then boom, you upload almost 7 mins video and suddenly all clear!

kvartz
Автор

hey man, just started coding about 2 hours ago. I got some friends that code in college and they gave me 2 problems to work on that are fairly easy. they wanted me to input 3 numbers and have my code identify the largest one, as well as be able to tell if that number was even or odd. Thanks to your vids and specifically the conditional functions one. I was able to (with a little trial and error lol) code that program they asked!! so thanks man, your vids are super helpful!!

Smakey
Автор

nice and easy, tried doing a worked example with like a grocery list and it worked perfectly. imma try integrate the input somehow lol see how it goes..

oliurrahman
Автор

We can also use numbers[-1] to get the last value

aristotle-vo
Автор

mind you if you are using a string in your list always quote each item " "... wonderful video

Edwinteachescode
Автор

can you put chime song in the background

AhmedTerminator
Автор

I literally typed the code exactly as it's listed on the video but when I click run....nothing!

SinaLaJuanaLewis
Автор

Hi, coming back to this from a later video. You mention that lists have to consist of the same type. I'm wondering why I was able to use both another class and other variables and this program still works? Am I misunderstanding?

class Dog():
def __init__(self, name):
self.name = name

class Person():
def __init__(self, name):
self.name = name

humans = [Person("Vincent"), Person("Bob"), Person("Joe"), Person("Vincent"), Dog("Kyuubi"), Dog(Dog(3)), Person(4)]

index = 0

while index < len(humans):
human = humans[index]
if human.name == "Vincent":
humans.pop(index)
else:
index += 1

for human in humans:
print(human.name)


Output:

Bob
Joe
Kyuubi
<__main__.Dog object at 0x7f88a67c44f0>
4

yorionenthusiast
Автор

I don’t understand why u minus 1 though?

Terabyte
Автор

You can also just use -1 without the len or the 5

stephanieo
Автор

How should I effectively study each section of this course? I plan on staying rewatching the Python videos for a month to better internalize it. Then moving on to the next section and repeating. Is that a good plan or is there a better one?

juicyjfan