This video tutorial covers Python's core data structures: variables (which store values with naming rules like no leading numbers, no spaces, and case sensitivity), strings (character sequences with methods for case conversion, whitespace handling, and stripping), and lists (ordered collections that can be modified through append, insert, remove, pop, and del methods, and sorted using sort() and reverse() functions). The instructor demonstrates these concepts through practical exercises, emphasizing that understanding programming concepts requires hands-on practice and that 'now is better than never' when learning to code.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Learning Coding until I master every concept (part 1)
Added:All right, it seems like I'm probably live with my zero viewers.
Okay, Scratch's new beginning.
And the first concept will be variables.
So let me find something profoundly interesting.
Declare variables, not war. What is this? Declare variables, not war.
Okay, bro. We'll declare variables, not war.
Rouge crop sounds like a interesting chapter title.
So we'll use this instead.
Now I am going to read my book because I love book and for coding I'm learning it via a book as such. I'm going to read and write notes. Then for light writing purposes, I'm just going to All right.
cannot start with a number. Okay.
Spaces are not allowed.
Variables are case sensitive.
H All right. Starting is pretty good.
variables are labels often described as boxes you can store values in is accurate in the start but it isn't 100% the same thing. The best way to understand a new programming concept is by using them in your programs. If you get stuck while working on an exercise, it's best to try again and again.
Yeah, that's pretty simple. Let me try try it. Now, this is a Jupyter notebook which is just runs the code quicker than any other things.
So the exercise asks me to run a normal variable and a given variable for printing.
Let's just write Roblox equals to very safe game.
Now I can print this with brackets not quotations. I just write the name and it works. Or I can print it directly by just typing very safe game. Both should do the job and print the exact same.
They are case sensitive. So if I type Roblox, it will give me an error. And coding goes from top to bottom. So if there's one mistake, everything else is just ignored because of that one mistake.
Oh, hi Radhan.
Didn't see you there while I was studying. Apologies.
Oh, you saw my attachment video. Oh, I I I also put a lot of thought into that video. And modern day is people are truly unaware of how others can get attached. And mainly they get exploited and shamed upon because of their own attachments. In honesty, we should all be aware of our own attachment styles to lead a safer and healthier life. Thank you for watching it and appreciating it though.
Anyways, let me continue my grand scheme of coding.
All right, next up Next up is strings. Okay, it's is useful to define different types of data. The first data type we'll look at is strings. Strings is a series of characters. Anything inside quotes is a string.
You can use single quotes or double quotes.
You can change cases using simple methods such as title which adds dot title which adds is a function and operates via different types of then there is lower which lowers the name.
It gives proper formatting.
There are also a concept called f strings to compose a message and then assign an entire message to a variable.
H interesting.
and you can use white spaces to organize it. A slash, a right slash adds a white space. To add a new line, to add a tap to your text, use a character combination of slash T or slash N.
R strip and L strip for left and right.
When we remove the extra space from the right side to the left and from both sides, both sides is just strip for both.
Next part is removing prefixes.
When working with strings or another common task is to remove prefix removed remove prefix bracket remove suffix.
Interesting.
avoiding syntax errors with string.
A syntax error occurs when Python doesn't recognize a section of your program as a valid Python code.
Now we have exercise.
So back to the app we go.
Now this is going to be some personal message. Use a variable to represent a person's name. And okay, I'll just copy the things for exercises.
All right.
Okay. How do I make this quotations?
Use a variable to represent a person's name and print a message to that person.
Your message should be simple.
Oh yeah, we have to use f strings for that. So let's just call it person.
Uh Winston.
Yeah, Winston, we all like you. Then we print add a f in the start for an f string. I should probably note that.
friend um person.
Hello.
Hello. Winston. It should print Winston.
Yep.
That's the first exercise.
And then name cases.
Use a var. Why is these highlighted?
Anyways, use a variable to represent a person's name and then print that person's name in lower case, upper case, and title case.
Personal equals to Jesse James.
O, what a name.
Use a variable to to print the person's name and then print the person's name in lower case, upper case, and title case.
How can I do it all at once?
I can do it all at once.
Friend, we'll use a f string lower equal to uh personal dot lower bracket.
That should work. If it works, I can continue.
We don't need personal. We need personal not person.
Yeah. Jesse James. Then I can add a comma or comma doesn't work.
Oh, we can just add a new line.
Then upper equals to personal do. upper then another N then title is spelled title not title bro we do not need anti-gravity update this should lowkey print Got all of them.
Jesse James. Yes.
And the lower prints all of them in lower case. Upper prints all of them in uppercase. And title prints all of them in basically the first letter is the uppercase.
So that's how that works. What is the next exercise?
Famous code. Find a quote from a famous person you admire. Print the code and the name of his author. Your output should look something like the following including the quotation marks. Albert Einstein once said a person who never made a mistake never tried something new.
Okay, let me find some.
Hello food. Hello bro. I love food too.
Wait, no. You said hello Kai. Oh, hello.
Now I'm finding a code.
Let me put this quote in scratch pad for dramatic effect.
There is nothing impossible to they who there is nothing impossible to they who will try.
Uh quote. Oh my god.
Oh, I understand how this will work.
We'll use fst strings and single quotes because double quotes would give us a syntax error.
Yeah. author dot title we use the title method to highlight it and space it prints the author's name once said then I add double quotes and then I input the quote itself then this should output the exercise Alexander the one great so there's nothing impossible to those who try yes it works identically that's a in that's the next exercise I did what the I did what the next exercise I said preemptively it takes some mindset Okay. Strip stripping names. Use a variable to represent a person's name and include some white space characters at the beginning and at the end of the name. Make sure you use each character combination T and and N at least once.
Print the name once so that white spaces around the name is displayed. Then print the name using the each of the three stripping functions. All right. Sure, buddy.
Sounds simple enough.
Legendary dairy person. Who is legendary person?
I don't know any legendary person though.
Bunty. Lifechanging name. Now there are these white spaces.
We print legendary person.
Then we'll try printing him with and without using the white spaces.
So we'll use f string as always.
slasht. Wait, I don't I want to know what slash t actually means. I forgot.
Legendary person. What does slash t do?
Oh, it just adds space. It just adds extra space in the start. I understand.
slash n leg legendary person dot r strip then we add brackets to identify it as a function and then I'll use another n then legendary person dot l strip then another n then wait I think I did the order wrong yes I did person with grip itself which removes all white spaces. So now it should print.
Why is huh? R strip. Why is there strip?
What? Why is there still space here? I do not understand.
slashn slashn.
Hey what?
What?
Wait. If I remove this.
Okay, that one is that. Why is there space here? I'm using R strip.
It removed the right spaces, but there's still space. I do not understand why.
If I just make it strip, will it fix?
Yeah, it fixes it. But if I make it R strip, it doesn't work. If I make it L strip, it works. What's wrong with R strip?
Did I spell strip long? No, I didn't.
Why is there space here?
Oh, wait. I'm stupid. I'm stupid.
>> [laughter] >> Okay.
Uh basically right means this side. As you can see in the left one left space is removed. So it goes to the start but uh there still remains the right white space.
Unlike that this one it removed the right and the right side of itself but the left side is still empty.
So this is how it should be and I did not make a mistake.
And finally the final exercise.
We do not need to run dummy code. Relax.
Python has a remove suffix method that works exactly like remove prefix. Assign a value python.nodes.exe txe to a variable called file name. Then use the remove suffix method to display the file name without the file extension like some browsers do.
H oh file equals to rivals cheats doexe.
Let me let me make it a string.
Now I have to remove the suffix file dot wait no suffix uh file dot suffix remove.
Is this how it works? Wait, no it's not.
It's not spelled suffix remove. It's remove suffix.
Yeah.
exe then I put it in quotation because it's a string and then I print file and that should do the job I think so nope it did not do the job all right file v2 equals to file removes suffix file v2 we print now that did the Or how what if I want to remove it directly?
Comma print ft string directly.
We're removing it directly. /t space file dot wait no bracket third brackets no that's second bracket file dot that remove suffix bracketexe quotations then I point the arrow at it and that should also print.
Yeah, it worked. None. None. Why is there none? None.
Huh? Why is there this? I'm confused.
Oh, Noru. Remaru. Hello.
Hi. I didn't see you because I rarely read chat while studying. My bad. I didn't see your message earlier.
Now, let me clip this masterpiece.
Stay with me. Stay with me.
Stay with me.
All right.
This is Python learning step one. I need to make a box. There's their There shapes. I love this.
Yeah, that's that's that's so much more beautiful.
Chapter one, variables and types. Now, I did I learned about variables. I learned about the first type which is known as strings and then did the exercise the book wanted me to do and got all of them right.
What if the code wants a nah none two of them?
I think it wants a none. I don't know why there isn't none in the box. Like I swear that's kind of suspicious, but it is what it is.
And next is Can I duplicate this?
Yay! Magic.
Let me edit this file.
Chapter two. We are not in chapter.
We're still in chapter one. Numbers and other chapter 1.5 for design purposes. I'm going to import this image because it's just for design purposes variables, bro.
What? Okay.
Python treats numbers differently depending on how they're used.
You can subtract, multiply, plus, and divide.
Python calls any number with the decimal point of float.
If there's no decimal number, it's automatically an integer.
And if you divide two any two numbers, even if they're integers, you'll always get a float. If you mix an integer and a float in any other operation, you you'll get a float as well.
Python defaults to a float in any operation.
If you're writing nong long numbers, you can group digits using underscores.
Basically, it works like comma without actually using comma.
All right, let me write it.
Wait, what what is the short acronym for float?
All righty.
Now it's back to exercises. So exercises it is What is this exercise number eight?
Write addition, subtraction, multiplication, and division operations that each result in the number eight.
Be sure to enclose your operation in print calls to see the result. You should create four lines that look like this.
Okay, I understand.
just assign some very cool variables first.
A B C D.
Uh D Two. Oh my god, so many twos. Why are they all just twos?
All right, it wants me to do addition.
Now, how do I do addition? That's a good question. That's a great question.
Actually, I don't need to do it inside print itself. I can just do this, can't I?
Addition equals to a a + b + c + d subraction subtraction 16 minus this.
I know this is more complicated, but I'm just doing it for effect.
2 * 2 = 4 * Why am I doing 2 * 2 * 2? A * B * C. That's it.
division equals to have to make it eight. What is eight?
18. No, 16.
2 Now, this should lowkey give me all eights. 8.0 8.0 [laughter] 888 8.0 [laughter] All right, bro. I get it. You're you're the cool one. The alpha that does not symbolize with the pack [laughter] 8.0 a little simpler method but coding should be simple.
The next exercise is I do not need to run dummy code, bro.
Favorite number. Use a variable to represent your favorite number. Then using that variable, create a message that reveals your favorite number.
Huh?
Isn't that like what I've been doing since the start of my entire life?
Favorite underscore? No. Favorite underscore number all capitals because it's constant.
What is my favorite number? That's a good question.
981.
Uh 00981.
Why is that tag? You can't add zero in the start.
Okay, you can't add zero in the start.
I'll add zero in the blast.
If I make that in, will it remove the zeros? It did not remove the zeros. I'm confused.
Uh, do I add it in the start then?
Uh, I don't know how to change the type. Well, it will be 8.0. Then there's nothing I can do.
Next part is comments.
If you want to be a professional programmer or a collaborate with other programmers, you should write meaningful comments.
I've already been adding comments. So, this part I can skip.
Wait, I need a terminal.
Terminal, where are you?
Uh, what is the book saying? Import this.
Okay, this is just a scam.
Basically, these are just some tips and tricks on how to write code.
How to write code better.
Back to our OG scratchpad.
Simple is better than complex. Whoa.
Use a simple solution. Even if a complex one is appeared, complex is better than complicated. Real life is messy and sometimes a simple solution to the problem is unchangeable. In that case, use the simplest solution.
Readability counts. I agree. We need to be readable in life.
If two Python programmers are asked to solve the same problem, they should come with a fairly compatible solution.
Now is better than never. Exactly, bro.
I'm doing it now, not never.
In this chapter, you learned how to work with variables. You learned to use descriptive variable names and resolve name errors and syntax errors.
Next is chapter 2 introduction to list.
Yo yo what's up and John slashcoms. Yes, I'm doing competitive Python. People do competitive rivals, competitive TSB, uh TWWW Wars. I do competitive Python because I'm so built different terminal. You can get lost. Let me copy paste this.
Where are you my beloved box?
All right. box.
Now that is perfectly aligned.
Chapter two.
Just copy this. No box. Why is this tilted?
Hello. Which lesson are you in? I'm in the most beginner lessons. I went over what are variables and a type of variables and then I went over numbers and other data types such as floats and the basics of using numbers in coding.
Right now I'm in the lesson of introducing lists. It's a data type which holds other data types together such as strings and numbers.
Now what is a list?
A list is a collection of items in a particular order.
list contain more than one element.
Square brackets indicate a list.
Individual elements are separated by comma.
All right.
Next up Then we have some fact lists are ordered collections meaning they are always in order.
Oh, okay. Good luck to you. It's been 5 months I've started Python and now I'm an OP decorator. Congratulations to you and I'm going to reach your status very soon. I wonder what's o decorator but hopefully I'll reach that and beyond it too because as it said earlier better now than today minus one gives the last All right. So that's the basics and now there is exercise. Okay, let me just copy the entire thing, replace it in here, so it's easier to see now.
All right, this is just jargon. Okay, so it's three exercises.
Store the names of a few of your friends in the list.
Now, this is going to be really tough because I have no friends. So, I have to make up some friends. [laughter] I have no friends. So, this going to be really tough exercise emotionally.
I prefer you learn with bro code.
Oh, I'm learning it by a Python crash course book.
This book will give me exercises immediately after it teaches me a concept. So, I'm using this uh this is anti-gravity. I don't I have VS Code, but the this is just a AIdriven one. It's better because it has built-in AI and I pay for anti-gravity.
No friends. Yes, this is going to be really tough exercise.
Well, firstly, we have Jamal. Okay, we should I should make them a string, I think. So, or is this how I try to that's how it should look like? I think so.
I believe Anthony that does not exist.
Winston. Oh, he's back. Oh no. Why is he back? And then Jamal Jamal Junior. Jamal Jr. with lowercase J's.
Print friends that I do not have. What is this? Where did this come from? Okay, it printed all of them. Let's give them some titles.
Okay, my bad. Original gangster.
I can use title and f strings.
Anyways, start with start with the list you used in exercise 3, but instead of just printing each person's name, print the message to them. Text each of the message should be the same, but each message should be personalized with the person's name. Oh, yes, my friends that I do not exist.
Personalize. Sure, buddy.
For that, we'll need to use frings.
Let's start with Jamal zero.
Oh, wait. I'm still in that very top 10 uh things to say to friends.
I just copy this entire thing which will just save time.
Nah, bro.
Nah, bro. Your name is really Anthony.
Little little bro when okay it's getting long and long I can just divide it into multiple print statements that will be superior so I'll just divide this one into different print statement Top one gangster.
What? What? Oh, I'm outside the quotations.
And finally, You stole my cake. What are top 10 accusations? Let me print this.
What? Why is there this random space in the start in each one of them? Because of this. Oh, my bad. OG, now it should be fixed.
N Jamal, you're getting weight. My god.
Nah, bro. Your name is an really Anthony little bro Winston thinks he's the top one gangster. Our friendship is over Jamal Junior. He stole my cake.
Oh, you can iterate each friend using a loop. Full loop. Oh, the book hasn't taught me full loop yet. So, I'm using this strategy.
Oh, yeah. You're right. I can iterate them, but I don't know how to iterate yet. So, this is the strategy.
List your own list. Think of your favorite mode of transportation, walking, such as motorcycle or car, and make a list of stores, several examples.
Use your list to print series of statements about these items such as I would like to own a Honda motorcycle uh transportation favorites.
Okay. So, we have uh firstly the Srank transportation walking.
Then we have the second Srank called running.
Then the fourth Srank called jumping.
Then another Srank called crouching.
These are the best methods of transportation in modern era. Then we have the my personal favorite teleportation uh print then strings.
One day I w I was transporting indexing walking walking to the shop. Wait, it's in the box. It can't be in the box.
What is this plot I'm writing?
Oh yeah, we need gap.
Then I need to copy this. This is such a long phrase.
I Crouching.
It can't be crouching. Bro, can I remove the suffix dot remove?
I think ouching.
Will this magically work? I don't think so. But I'm hoping. In life we all must hope let's see hope. Hope okay. My hope is gone. I cannot remove suffix and list.
Okay, now I just changed grammar. Then I started crouching to dodge his water gun. All right, that should fix everything. There's still a bug. Print f one day transportation to the shop.
Set object is not subscribed. What? Set.
What's What do you mean set object? It's not subscribable.
Okay. Now, this is a big problem. But no problem.
What did I do wrong?
0 1 2 3 4 type error.
Oh, I made it a set. That's why [laughter] I made it a set.
My bad. OG.
I do not need new code.
One day I was walking to the shop. Then a man suddenly started running at me. I started crouching to dodge his water gun. Then I teleported away.
Teleportationed away. Teleportation away.
That should fix the grammar.
Then I teleportationed away.
Well, I unconsciously skipped jumping.
My favorite part.
Let me try again.
remove suffix no prefix suffix I think so suffix means last and then in will that work yes it works okay that just saved me absolutely nothing but just brain power I love coding Can I put this in the second row because I need to take a picture? No, I can't.
That's so mean of you.
Stay with me. Stay with me.
life. [snorts] Now we're back to reading.
So, back to Scratchpad.
You're crazy. I agree with you. I might just be a bit crazy in the head.
modifying, adding and removing elements.
That sounds interesting. Image as much as I love you, I can't keep you. So, you go in the side because this is my note takingaking.
Most lists you create are dynamic, meaning you build lists, add and remove elements from your program.
You can modify a list.
You can modify it by indexing it then replacing then equal replacing. Yes, equal replacing.
You can change the value of any item in a list, not just the first item.
Yeah, by indexing it, we can change it.
The simplest way to add a new element to a list is append.
What is append? Oh, it's a function.
Fun facts, but it should add it in the last method.
If I start with the empty list, I can just keep on adding it using the append function.
You can add new elements at any position in your list using the insert method.
Oh, okay.
Location item.
Using this I can append new items to the list. I mean insert.
I forgot patience.
Often you'll want to remove an item or a set of items from a list.
Dell helps remove the item.
Sometimes you'll want to use the value of an item after you remove it from the list. You might want to get X and Y position of an alien just to shoot it down.
Pop method removes the last item in the list, but lets you work with that item after removing it.
removes the last item.
Oh, never mind.
You can index it by using X. But if you leave it empty, it will remove the last item.
Stay with me. Stay with me.
Oh, okay.
Next is removing Remove in brackets not third indexing.
This removes the value unlike the others.
The remove method deletes only the first occurrence of the item value specified.
If there's a possibility the value appears more than once in the list, you'll need to use a loop to make sure all occurrences are removed. You'll learn that in chapter 7.
What the hell are these exercises? There are 2 million exercises.
I might be cooked.
All right, back to exercises. I guess not scratch pad.
So many exercises. I'll take a select few at a time.
All right, remove that quotations space.
All right, what are these exercises?
If you could invite anyone living or disease to dinner, who would you like to invite? Make a list that includes at least three people you would like to invite to dinner. Then use that list to print a message to each person inviting them to dinner. Oh my god. Anyone? Sure, buddy.
Dinner party, of course. Then we had list. First person in our list is Michael Jackson. of course. Never listen to any of his songs, but I'm going to invite him because he's dead. Then we need a alive person.
Of course, we will need Napoleon himself.
Without him, how can we have a dinner party?
And who else finally? Of course, we'll finally need myself in the dinner [laughter] party. How can I forget myself?
Then use your list to print message to each person inviting them to dinner.
Use your list to print a message to each person inviting them. Then use your list.
Okay.
Mr. Mister dinner party index zero.
You're welcome to dinner. exclamation mark slash an dict dictator. Of course, dinner party bracket one you must come.
Then finally and yo me.
All right, this score should work. Mr. Michael Jackson, you're welcome to dinner. Dictator, I think I spelled Napoleon wrong. Did I?
Mike Tyson. I agree.
It's Napoleon, not Napoleon. [laughter] It's a no wonders.
Napoleon. Yo, free food as such. Me myself is coming. Of course, me myself.
Changing guest list. You heard that one of your guests can't make it to dinner.
Oh no. How can that ever happen? So you need to send out a new set of invitation. You'll have to think of someone else to invite. Start with your program from exercise 3. Add a print call that end of your program.
Print.
All right. So, Michael Jackson can't come because he's dead. That's a big problem. Actually, Napoleon is also dead, but we'll imagine he's alive.
Saving the name of the guest who can't make it. Modify your list. Replacing the name of the guest who can't make it with the name of the new person you're inviting. Print the second set of invitation messages. One for each person who is still in your list.
can't make it equals to dinner party.
Pop because pop stores the information and we'll use zero because it's Michael Jackson.
And for verification, we'll print out can't make it to see if it works. Yeah, it works.
And what is it asking me? Modify your list. Replacing the name with the guests who can't make it with the name of the person who you're inviting.
Bro, who am I inviting?
All right. Dinner party dot.
Let me check my notes append.
Who are we adding to the party?
Who can I add to the party?
Yes, there's myself and Napoleon. Who do we need to make a very strategic conversation?
Of course we need Spongebob.
Of course we need Spongebob.
Uh, print dinner party.
As such, there should be Spongebob now.
Yes. Now we need to send a new message.
Mr. M, you're welcome to dinner.
Then we just replace this.
Then I just do this sir.
Syntax error.
What?
My bad. OG. My bad.
Okay. Syntax error should be fixed.
Oh, for spacing, I should just add a few ends in the start.
Yeah, Mr. Napoleon, you're welcome to dinner. You're free food as such. Me, Spongebob is coming. V2, what?
Spongebob.
Sir, myself. I'm calling myself sir now.
My bad. OG gangster. Let me fix this.
All right, indexing worked. And I replace the person.
What?
Unfortunately, Michael Jackson is not coming. How sad. How unfortunate. That's such a sad thing.
What's next?
You just found a bigger dinner table. Oh my god, now more spaces available. Think of three more guests to invite to dinner. Start with your program from exercise 3.5. Add a print call to the end of your program informing people that you found a bigger table.
Use insert to add one new guest to the beginning of your list, middle of your list, and then use append to add a new guest to the end of your list.
Bro, I don't even know these guys. Who are these people coming to my party?
Okay. So, >> [sighs] >> Okay, the print.
Yo guys, big bigger table found.
Now we do slash T and slash T again. So there's like extra space. Yo guys, bigger table found. Add slash N in the start for some space.
Oh yes, bigger table is found. How, bro?
That's great news.
Dinner dinner party dot insert.
Who are we adding to the party now?
It says in the beginning. So, zero I suppose.
Why does coming up with a name take me five years compared to coding the actual thing?
Of [laughter] course, we need to invite lion. Lion.
How can we start the party without lion?
Then I add a comma. Party.
Then in the middle. So if we added four, then the middle would be 0 1 and then two.
So, if a lion is coming to the party, we also need the wolf, of course.
And finally, I need to use append, which I've already done.
Dinner party dotappend.
Who are we appending? And to ensure lion and wolves don't start slurring at each other, we need police police officer M.
Not Michael.
Patrol. We need police officer patrol.
Okay.
Print a new set of invitation messages.
One for each person in your list. I do not want to print once for each person of my list.
Let me just do I for print.
I don't know how to make I don't know how to use loops. Let me try this shortcut though.
Will this work? Yo, it worked. Yo, you're invited. Lion, you're invited.
Napoleon, you're invited. Wolf, you're invited myself. You're invited.
Spongebob, you're invited. Police officer patrol. I might be a genius at this point.
Using a for loop while learning lists.
Add Gandhi, of course.
Pro probably the next exercise wants me to add more people. So, I'll add Gandhi next. Shrinking the list. Oh no, why am I shrinking the list now? I work so hard.
You just found out that your new dinner table won't arrive on time for dinner.
Oh no, you have space for only two guests.
Start with your program from exercise 3 to six. Add a new line that prints a message saying that you can only invite two people for dinner. Use pop to remove the guest from your list one at a time until two names remain. Why one at a time? Each time you pop a name from your list, print a message to that person letting them know you're sorry you can't invite them to dinner.
Print a message for each of the two people still on your list, letting them know they're still invited.
Okay, bro. More. Now we're shrinking, which is actually more useful, I guess.
But we have so many people invited.
We don't need n.
You're invited live, bro. What is this?
Never mind. You all can go eat on the streets.
Never mind. You all can go eat on the streets.
Now I need to shrink it. How do I shrink it? I need to use pop.
This will take years to type. Why did I add so many people?
Okay, first lion. I apologize, but you got to go, bro.
Wait a second. I need to make variables for all of them.
Eat my life.
Sorry, Napoleon. You need to go eat food in the streets now.
Why am I typing such long long ass message? I V2 is enough for comprehension. I'll just add comments.
Okay, Wolf, you're not coming. I don't want to argue with you.
All right. Myself, I need to eat. So, I'm I'm coming.
I don't want to talk to Petroleum.
Actually, I don't want to talk to Spongebob either. So, I don't want to I want to remove all of them.
Spongebob, at least I'll be with the police officer.
Both of you all. Y'all won't be missed.
List of loser. List of loser.
Let me add emoji for dramatic effect.
Oo. Oh my god. Lightning emoji.
No error. Why error? Why? Because I forgot f string. Genius.
No error. Why error?
Why?
Four doesn't exist.
Uh what?
Okay. 0 1 2 3 4. Why doesn't four exist?
If I wait no pop wait pop removed pop removed lion then one also means oh it already removed dead that's why so realistically they all should be zero because lion and Napoleon Wolf. This should be zero. Then I have to skip myself and add Spongebob. So it will be one.
Yeah, I might just be a genius.
Actually, never mind. Y'all can't come to eat. Go eat on the streets. Repzo, you won't be Imagine eating on the streets. List of losers. Lie. Napoleon, Wolf, Spongebob.
Okay.
What's up? Yo, what's how's it going, bro?
We're learning some coding. And this coding task is very complicated. As you can see, we're inviting my non-existing friends, some dead, some alive.
I want to try out the other commands like Dell and then remove by value.
Put in message to each of the two people.
Yo, party time. [laughter] Party time.
Yo, let's go. Party.
Who is zero?
Dinner party index zero.
Can I use comma here? I can.
Wait.
Yo, party. I myself am here.
And of course is also here.
Let me add some emojis.
Oh, shock emoji. Heart emoji.
Oh no. Oh no. Unfortunately, there's a bomb in the table planted by Wolf. Why, Wolf? Why would you do that? No. No wonder I didn't want to invite you.
died. Oh no, he died. Police police officer patrol died. [laughter] Now I add a comma Dell. Wait, dinner party. Dell.
Wait, no, that's not how it works. How does Dell work?
How does Dell work? I forgot.
Dell then the list name and then the index. Okay, it's Dell space list name by index.
Huh? Dell. Wait, how does this work?
Wait a second.
Uh, yeah, it should work like uh Okay, I guess it dinner party one.
Because police officer died, man. Why did he have to die?
I enjoyed my sandwich.
Rat hat.
I died, too.
Sad emoji. [laughter] Sad emoji.
What is the other command to remove it?
This remove. Okay.
Okay. This works like a function.
Uh myself.
No. Why myself? Print dinner party.
Yep. It's a empty list. I enjoyed my sandwich. Unfortunately, rat had eaten it before. I died, too.
Bro, this is such a sad story. How did I come up with this? So guys, the story is Mr. Michael Jackson, you're welcome to the dinner. Dictator Napoleon, you too.
Yo, free food. I myself is coming to my own party. But Mr. Napoleon, you're also welcome. Unfortunately, Michael Jackson can't come because he's dead. But we found a bigger dinner table. So we invited Lion, Napoleon 2, Wolf, myself, Spongebob, police officer patrol. But never mind. The table was had a broken part. As such, imagine eating in the streets. Lion, Napoleon, Wolf, Spongebob. Haha. Scream lightning emoji. Yo, party time. Let's go. I myself am here. And of course, police officer patrol is also here.
Heart emoji.
But unfortunately there is a bomb under the table. Oh my god.
Police officer patrol died. I enjoyed my sandwich. Unfortunately Rad had eaten it before. I died too. Cry. Sabi list empty.
Think I did my homework perfectly. No other code can be as perfect as this. If you can even call this code.
It's It sounds like a bomb plan. I swear to God.
Let me take a picture of these. I need to remember my profound achievements in life.
To my one viewers watching this, what do you guys think of this emotional story?
It was truly heartbreaking.
It was a kidney touching story. My kidney almost got touched and I was severely wounded.
Let me switch to scratch pad.
All right. Now we need So sad. Heartbreak. Heartbreak. I agree, bro. So sad.
>> [laughter] >> This was this was me half of the time looking at this code.
[laughter] This was police officer patrol in the background.
Bro, why is everyone crying?
>> [laughter] >> This was a wolf. Why wolf? Why did you plant the bomb? [laughter] Why did you plant the bomb?
I want to calm down.
Then I see lion. [laughter] We of course need visuals for everyone.
They were a part of the gang.
Okay.
You should use NVM. What is that? I don't know.
I'm I'm I'm actually a Python beginner.
I use other languages. So, I don't know.
Learning from a book.
What an emotional story. I learned variables, no images. I learned numbers, no images. I learned list, there's full on plot story line. There story line. Is there a story line though? I'm very hungry now and I've been studying a lot. But let me check if the chapter is short.
Often your list will be created in an unpredictable order because you can't always control the order in which users provide their data.
Okay, next we are going to be learning about sorting list.
Sounds cool to me.
Why is my microphone making noises on its own? Wait, there's no filters.
Noise suppression is on. What's wrong?
I guess there will always be background noise. I can't do anything.
Let me stop my MSI After Burner.
You can sort a list permanently with the S sort function. Okay.
Okay. Sorting function. That's wonderful. It sorts them in alphabetical order.
That's wonderful.
But in the sword we can also type reverse reverse alphabet. Yo, that's nice.
To maintain the original order of a list but presented in a sorted order, you can use the sorted function.
Lie and eat the street like tough. I agree. It is a editor. Oh, like a coding editor. I see. I am using Jupyter notebook because it gives instant results.
Sorted is used inside print statements.
Okay.
Sorting a list is complicated when all values are not in lower case. There are several ways to interpret capital letters and determines sort order.
To reverse the order, we can use the reverse function.
Finding the length of the list.
length of total items.
Python counts the items starting with one.
So it counts by starting with one.
Line is sitting on the street.
[laughter] How lion is sitting on the street. It's crazy.
Just got the joke.
Bro, what is this? What is this tutorial exercise?
All right, we're doing this hyper productive exercise. Then I'm going to take a break.
Wait, no, I'm Oh, yeah. Chapter ending.
Yay. I love this book. All right, we're back to coding. Where is my window?
Do not want to live stream the book.
What is anti-gravity?
Okay, guys. Sad sad. But we're removing this story.
Yes. Even I was shocked when I saw this detailed tutorial on what I must learn.
Bro, why are these things highlighted? I don't understand.
Think of the at least five places in the world you'd like to visit. Oh my god.
All right.
Locations.
Visit. Okay. So, firstly, I want to visit uh Bronze City. Bronze city.
[laughter] Next, I want to visit the rivals arena map.
Then Japan with someone and because there's anime. Then where do I want to visit? Of course, the moon.
And what else do I want to visit?
Uh, of course. Where else do I want to visit? Street where l street with lion.
The street where lion was sitting at.
These locations are my dream locations.
Make sure the list is not in alphabetical order. Print the list in its original order. Don't worry about printing the list neatly. Okay.
Show the list is still in original order printing it. Use the sorted to print the list in list in reverse alphabetical without changing the order of the original list. Okay.
Uh, location visits.
Okay. So, bronze city and then it sorted it in.
But how do I reverse it?
Wait a second. How do I reverse it?
The reverse al taught me how to sort with normal not reverse alphabetical.
Wait idea. Might not have a brain but I have an idea. Will this work?
It worked. I am genius. Might not have a brain but sometimes I have ideas.
show that your list is still in the original order by printing it again.
Sure, buddy.
No. Why is there a A here? I don't need A. No. What? What are you importing?
Yep. Bronze City Arena, Japan. Moon Street with Lion Auction House. Oh yes, we I also want to visit auction house.
What are you reading? Oh, I'm reading uh Python crash course by Eric Methn is the third edition. I'm already at page 100 is like 800 pages. I'm thinking of doing a 100 pages every day. As such, in 8 days, I'll be able to code properly.
The WW reference. Yes.
All right. What's next?
Use reverse to change the order of your list again. Print the list to show its show back to its original order. Okay.
Uh, location dot reverse print location visits. Now it reversed it back. Now it's a permanent reverse.
Okay. And now we sort it back.
Yo, use sort to change your list so it's stored in reverse alphabetical order.
Okay.
Well, now we're finally done with this whole long ass reverse change sort.
Reverse chain short.
Working with one of the programs from exercise 3.5 through 3.7. Use len to print a message indicating the number of people you're inviting to dinner. Why are we inviting people back to dinner?
No, I already deleted Okay, fine, bro.
Dinner party V2.
Okay, who are we inviting? Of course, we have to invite Lion. He was so sad last time. We're not inviting Wolf, but we're inviting officer patrol.
Of course, we're also inviting myself because if I'm not there, who is going to eat?
And lastly, we're inviting Gandhi, of course, so we can have a philosophical debate.
Use the length to print a message indicating the number of people you're inviting to dinner.
Print F string.
We're inviting four people to dinner. Yes. Let's go.
Think of the things you could store in a list. For example, you can make a list of mountains, rivers, countries, cities, language, or anything you'd like. Write a program that creates a list containing these items and use each function introduced in this chapter at least once.
Bro, I don't want to do that. I have already done that from the dramatic programs I've made.
That sounds like way too much work.
Let's switch back.
All right. My favorite part of life.
Box.
Going to box these memories. This profound learning journey. We learn variables, number types and then list.
Next chapter working with lists loop through an entire list. Oh, next chapter is going to be working with more list. So I can try out these functions next time.
But hey, coding is very fun. I need to learn the absolute pinnacle of coding if I want to complete my dream.
Even so, I must lock in. Locking in is the only thing. What a journey. I wrote a simple program about running. Then it turned into these most dramatic story. Me patrol ling down the street. Wolf [laughter] planting a bomb. Then my professional dream of visiting Bron City Arena, Japan. Moon street with lion.
Lion with the street. Lion.
The lion doesn't turn around when the small dog.
The lion does not turn around when I invite him to dinner. It does not turn around. The lion's eyes are sensitive to the light of inferiority, so it will not come. This is Petrol's reaction after hearing that statement. The lion does not care about inferiority. It cares about free food.
This was a very fun experience. But I will have to end the stream now.
Now I have to end the stream so I can go rest.
So thank you for watching whoever watched and I hope you guys learned coding too. Even if just a little watching me do the most random things in the world.
I'll be streaming coding
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

Gremlin Arrives… While Dorothy May Takes Another Step Forward
The-moons
10K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23

FURIOUS Raskin CORNERS DOJ over Trump DARK PAST!!!!
MeidasTouch
237K views•2026-07-23