Transcripts
1. Introduction: Hi. Welcome to professional back in Web development with Pichon Flask, where you learn how to build where applications Using the amazing Python language. My name is Jorge Escobar, and I've been lucky to work in the leading tech companies for the past 15 years, and now we'll show you from scratch how to become a professional Web developer. You can find a lot of online courses that promise you how to become a Web developer. The truth is that in the professional tech industry, there's no such thing as Web developer positions. You're either a back and developer or front end developer on the skills required for each are completely. This course will show you step by step, the best practices to begin your career to become unemployable back in Web applications. Developer I will show you step by step and through the power of video on introduction toe the Python language. How to install Flask, a first look at sequel databases and then we'll build a blogging application using best development practice. At the end of the course, you will challenge to expand the application by developing a commenting system for Blawg. You will also be able to get the full court base as it looks each step of the way so you can develop your knowledge looking at how the system grows bit by bit. The course is the sign for people with little or no previous coding knowledge but are eager to learn how to build Web applications. All you need is a computer and the willingness to put your full attention toe the Metis. Listen. There are other courses that go the easy route and teach using graphical tools. I can tell you, those students would not survive a real life interview in a professional by my course now, and I will start your path to becoming a professional python backend weapon.
2. What is Backend Development?: Okay, let's take a look at what is front and back in development. Um, for that we're going to check what a Internet process looks like on a very high level. Um, let's a diagram and and understand what the steps look like when you request a page. So the first thing you need to know is that there's always a browser and a client. The browser is basically the program that you used to access the Web, the Firefox grown Internet Explorer, whatever you use, and then the server is basically a service that's out there in the Internet. Basically, um, it's a group off servers or computers that are, um, located in a specific you're out. So when you type of euro, what happens is the, um, your Internet provider will hook you up, will direct you to the appropriate server, and then that server will has a process that's a looping process that is always checking. Is there any requests there any requests? And when it received your request for a specific page, it ah basically renders or or comes up with the with the code to build the page that you're requesting, and for that it can access a database where where all this content is is located. Once that Carlton is located, it packages all that up into a webpage on B, returns it back to the browser where the browser will render it as, ah, so appropriate. So what is back end development in front of it? Development? Um, so the idea is that back in development is the processes or the software, Um, the code and the, um the different routines and algorithms that live in the server, um, and interact with the with the database, um, versus the browser code, which is the front. And development so far in development entails working with HTML, CSS and Js, which are ah, the basic, you know, languages for the basic systems that allow the browser to render the content of the server is giving back. So you can think of it as front and being, um, everything that has to do with what declines sees and then back in is all the data behind. Ah, what that page looks like. So in this course, we're gonna we're gonna focus on that on that piece, we're gonna be talking about how to code um, and Ah, and how to develop applications that are inherently listening for requests from a browser and return back ah content code, if you will, that will allow the browser to render that data that information that is stored in the Indus Server.
3. Why Python?: Okay, So one question you may ask it's y Python, where we're learning Typhon or back in development and not something else. And there's a lot of other languages that are that are suitable and have good Ah, you know, good reviews or or their talked about very well on the Internet. And I think it's a personal decision. My personal experience has been that Python has been a very, um, easy to learn, like the learning curve is not too steep. Um, but it's also a language that that it's a joy to read, um, a lot off coding when you're when you have a coating. Careers is about reading other people's code, and Tyson makes it really easy to understand. What, what the thinking waas off another quarter? Um, just by reading it without even looking at the comments, um, or documentation. I think, um, you know, Python ease is Ah, it's fast. Um, again, there are people that say that other things are are faster, but I think once you get into the, um, the real mawf Web, um, Web serving and serving times and all that I think there are many other Viable is to consider um, aside from how fast the languages. But having said that Python is Reese is pretty fast. Um, I like that. It's, ah, object oriented from the beginning. I think that we're gonna talk about a little bit. Why that that's important. But, um, s a first introduction toe. What that concept is it has to do with laying out your code in a way that's reusable and that you can leverage other people's work without having you to reinvent the wheel. Um, that's kind of like what object oriented for me is, ah, what the benefit is. It also, um, you know, building on top of that python is very extensively has a lot off, um, third party libraries that can do what I mean, there's, like, thousands off things that you can do with it from, you know, like math, um, calculations from hooking up to the most popular that air bases from, um, you know, interacting with social platforms like Facebook, Twitter and ah, you know, Ah, a lot off very, very exciting projects that, um that are across that believe across fields off different, different things, like from gaming to, like, scientific to business. So it has a lot off libraries, and the community around Python is very, um, very strong. They're very passionate about by phone, and you will hear about a little bit of the rivalries, especially with the folks that that, like Ruby on rails, which is kind of like a ah, big, um, it's a counterpart or or competition for Python. Then you know, you have to know jazz community also popping up. But it's a it's a friendly competition. I think that, um, you know, each language has he has its own strengths and its deficiencies. But I just like Python. I felt very much at home. Um, I came from, ah coding in peril and then pee. It's B and, ah, now python. I kind of like I look back and it will be very hard for me to go back to another language
4. The FromZero Approach: Hi. I wanted to talk to you a little bit about why is from zero different or better than other courses? Well, first of all, I have experience with complex projects. I've been working with both big companies and start ups, and I've completed a lot off high traffic and fast response, very complex projects that have, um, dozens off developers committing and contributing. So I know the best way to, um, approach a project and make it efficient, scalable. So I'm gonna teach you all those things that I that I know. Um and, um, one thing that I I I'm always striving to doing these courses is to guide you through the basics. Ah, or start with the basics. And then we want to advance topics in the most efficient way. I e I'm not gonna go into small details or maybe go through all the, um, all the chapters of a for example, Baekeland book. But I'm gonna go through the most efficient way so that you can get yourselves up and running and ready for development. Um, I'm also gonna be teaching this us hands on course in all the courses. That means that you're always gonna learn by doing and not just getting a lot of information off the projects or the courses or the languages before actually doing stuff. So it's gonna be very hands on, and I'm not gonna sugarcoat it. Um, it'll be I'm gonna teach you the hard way. Which means I'm not gonna teach you, for example, how to use my sequel or a database using a coolie like PHP. My admin. That's another way that professional developers do it. So I'm not gonna go ahead and just teach you something That's E. C. Because it's just easy for you to use it. You're gonna actually learn the tools the way that professional developers do it in in the leading tech startups. So I hope that you join me and that you enjoy this course on bond. I'll be there to assist to in every step of the way. Um, that's why let all the other students, But I can promise you that you're gonna learn, even though it's gonna be hard sometime, Um, you're gonna learn the proper way, and you're gonna be a professional Web developer in no time
5. Introduction to Cloud9: So now we're going to talk about what is the development environment that we're going to use. And I did some searching and I decided to finally go for Cloud nine. So Cloud nine is basically, ah, Web development environment. Think about it. I say your your server in the cloud. You can add it coding, and you can start databases and it works based on a technology every like, which is Doctor Um so I think it's It's ah, it's a great way for us to learn coding without, um, having to install things, installing python. And if you've if you've seen some of the courses I have, I always go into, like how toe set up. You know, the different environments and the databases and and all that. But I found that students, because they were just like starting to learn it, was kind of like an additional hassle for them to learn how to set up, you know, Windows, Paice, owner or Mac by phone, and then the data basis and all that. So I've decided to start using Cloud nine as the development environment for all my courses , and it's gonna be good because we're gonna be able to basically install and be able to code and work on this platform without having to install anything on our computers. And it doesn't matter what operating system you have for if it's Windows or Mac, you basically will have a lean it's machine running on, um, on the cloud, and you can edit and work on your application wherever you are. Um, the good thing is that they're they're pricing model. They have a free tier here, as you can see. And, you know, you can basically sign up, just enter your user name and password, and he has some pretty cool features like, um, collaborative coding. So, for example, you can, you know, called with another friend of yours or another student on you can we can install data basis and set of frameworks without any problems. So I think it's gonna be a good a good thing for us to use. And we're gonna go over it, um, a little bit us. We start doing the scores
6. Closer Look IDE: Okay, so let's get a little bit acquainted with different areas off cloud nine. So first you head over to see nine dot io, and you can basically just click on tried now to register, um, your new account. Um, once you click there, you can sign up with. If you have a gate, have account or a big bucket account, you can sign up with that. All the ones you can choose a user name and email and a password, and select here so that you can get, like, a capture and then create your frequent account. Like I said, they have ah free account here. They also have, like, some paid paid account ears. But for the purposes of this course, you don't need to really get into a a paying course. I mean, account. So I'm gonna log in with get hub. And when you when you sign in or you register, you get basically this area, which is the dashboard, and you have what they call workspaces and workspaces. Think of them as basically different projects and they're actually basically certain, like separate servers that you're creating with applications in it. Um, so initially you get this test workspace, and then you can create a new one, which is what we're gonna do when we start our first flask application. But let's see what happens when you when you select that existing workspace. But before we get there, if you click here on the name off the workspace, you basically have the capacity off. Like doing some editing you can have. Ah, you'll see a read me. You'll have the files that are in there. Um, so you can take, like, a quick look on. Leigh, Read me. Um is here in this in this test project, and here's a very interesting one. You have members and in members you can basically invite. If you have invited people, you can see them in there, um, to invite people, you need to be inside of the off the actual project. But you also you'll also see how much CPU using how many, how much of the ram and how much of the storage you're using. And they have. For the free tier, you can have up to one CPU 512 megs of ram and one gigabyte hard drive, which is more than then generous I find, um, but now that we know more or less, what's that about? Like I said, you click on the name itself. You'll see those those those statistics. But in order for us to actually start doing stuff, you click on this green open button. So once we click open here, well, we're gonna be taken toe the what's called the I. D or the integrated development environment. And basically, this is kind of like a code editor also has, like, a terminal here for the server. And you have a basically a file navigator, as you can like, you recognize from from similar type of applications, like coordinators Or, you know, even like, you know, work or editors. But, ah, here you can basically navigate what's in the folder. Right now, we only have this file read me MD on the side. Here we have basically, you can edit. Um, you know anything and you have an undo function as well, if you want. Um, it shares like a lot of the things that normal coordinators have, so it's It's very, very well built, Has a lot off capacity. You're not giving away a lot off, um, off power because you were using this disintegrated Ah, development environment. And here the bottom. We have the terminal, and this is something that I always kind off force students to kind of get very acquainted with because it's basically the the way that you interact more with with with systems we don't want to get used to using, like, graphical things. We want to be very comfortable with the with the terminal. If you click on this little kind of like a window function here, we will get a, uh, a standalone editor. And you can minimize again by clicking on that, um on that is likened. And 11 important one that you want to remember is control escape, which basically shows and hides that that terminal back and forth. Um, you can also, like, add tops here, for example. You can add a new like and I think when you when you've opened it for the first time, you'll see this in needed JavaScript editor. I usually close it because it's not something that we're gonna be using, uh, for this course, so you can go ahead and close it, but you can have another terminal window. Let's say from Ah, with another folder open or things that you want to do a swell. But in any case, um, it's it's ah, it's a very nicely integrated environment and what we're gonna look at next is some basic terminal function so that you guys get better acquainted with with terminal commands and how to copy and navigate directories and things like that.
7. Shell Commands: So the star playing a little bit with the terminal? Um, I have modified the callers as we can see here, Um, I going to Ah, you go here to Preferences, and then you go to, uh, terminal here. And then I put the background colder by clicking here to black so you can basically put any any combination of colors. I also increase the phone size to 18 so you guys can can see a little a little bit better. Um, and I close that and then let me put that in full screen and start, um, doing some basic a man so you can get acquainted with how, basically our linen, um, file management and and commence work. So the first thing we're gonna look is we want to know where we're at at a given time. And for that we use a chemical PWD, which is present working directory. And here it's It says that we're at home boom to work space. You see, guys understand. Home is basically usually the folder where the the accounts the user accounts are placed in . So if you had another user cold, you know Jorge, it would be slash home slash Jorge, and that's called the Home Directory for that user. And this still the basically represents that. So if you're in any that say we moved to any other folder, um, we can quickly go back by doing CD, which is change directory and putting that till they're there. It'll take us back to the to the home directory. Um, so and in cloud nine, there's a There's a workspace folder, which basically is where the projects are stored. I don't have a problem with that. I usually when I work on Lenox, I have, um, actually worked with the O. P. T directory. But workspace works finest well, so again to let us know where we're at PWD. So we're in the home Bhutto, which is the user that that Chlo nine assigns you automatically when you when you select the the bone to environment and then work space, which is a directory where, where we're at. So let's see at how we can see what the contents of the directory are. And that's basically the command ls So ls will show us what What files are in that current directory. And so, as you can see, we have read me dot MD, which is that Read me file that we saw on the editor earlier. Um, now, let's say let's say we want to create a new directory within the home. A boom to work space. The command for that It's make directory M k the I r. And let's say we create a direct trickle test. Um, Now, if we do ls you'll see that we have read me. And then we have a directory called Test. So in order for us to change the directory, get inside of that directory we used CD and then test. One trick that you guys want to know about is that you can put the first, like letters off, basically commands and directories and all that. And then if you press the tab, you'll see that it auto completes to whatever, um, the best matches on if you continue clicking tab, you continue seeing through those things. So if I If I do see the r and then click tab, you'll see that, um, it should get me toe. Since I'm not in the Marine, the workspace. So what? Basically, you will get the read me empty, but I'm going to go to the so if I do ls you'll see that? Read me there, um, on gonna change to the test directory here. So right now there's nothing in there. Um, the next thing we're gonna do is we're gonna use a common cold touch and touch is useful to create empty directories. Like, if you want to just create a quick, um, file that has nothing in it. So we can do, Let's say, test test, not txt. Um, if you do a less now, you'll see that, um, there's a test txt now in there. So that's a useful command we're gonna use it to. There's a, um there's a file name called Any P Y that we use for initializing directories as modules for python ball will get will get toe that quickly. If you want to clear the screen on, go back to the top. We used a clear command, and that puts us with a clear with a clear screen. Um, some other useful things. Let's say we have Ah, the test directory. Here. Let's create another directory called test. Um, in Let's say test in. Okay, so now we have tastic City and then another folder. We think that, um, cold test in. So let's say I want to move that folder. I mean, that filed spoon that's dot txt two. Their test in I use the M V command, which is move, and basically I'm gonna move test the txt to, ah, test in directory. So I do that. So I move. I'm saying move test txt to within the directory test in effect press enter there. Now, if I do a last, you'll see that we don't have test txt anymore, and it's in test in. But how do I checked up without having to go again? Like doing seedy testing You can actually do l s and then type the name off a directory. And if you press enter, you'll see the contents off that directory within, um, that that that folder that you have selected so you don't have to go inside of it. So that's the move, Command. Um, there's also, um, a very useful command called Cat. Let's go back to the to the home folder and then workspace. So see how I did that? Um, um, I'm now in the homeroom toe workspace, so there's a chemical cat and cat basically allows you to see the contents of a file quickly without having to, um, open theater or anything. You just want to, like, take a quick lands. So there you go. So if I do can't read me, I see the contents of the file without having to go to the to the editor. Um, if we have a long file, we can also use a command clear the screen called more. So if I do mawr and then read me, um, it basically will Pagine eight because this this file can be seen within only one page. There's not a whole a whole lot off use for it. But if you if you type more and there was more than one page, you can basically see the contents of the file in a paginated manner. Um, one more useful one is called man and man. It's like the manual so you can see the options that you have for any in UNIX or Linux commands. So let's say if I type man CP, I can see the Aled the options that I have for the for the copy command and you can press down arrow or up arrow to see them. The file. Or you can also press the space key and then paginated by page. When you want to exit, you just press the queue, the queue letter and it'll go back out. So, um and that's what basically, it's using the more command, which I was telling you earlier. Um, the last thing I want to talk about is the wild card. So if that they have, let's go to the test folder and let's say, let me create quickly, that's two dot txt and then test three dot txt. And there's something called Wild Car, which is the asterisk. Um, and it's a wanted to move quickly a bunch of files that started with test. If I do move, Test star or ASA is the T Eckstine and I want them in the test in folder, that ass teres is going to say, OK, anything that has that begins with test, no matter what, uh, letters or numbers come afterwards and then after that, a dot and txt are gonna be moved. So if I press enter there, you'll see that, um, I don't have the test. Um, you know files anymore, and they're all in the test in folder. So that's a quick look at terminal commands, and there's many, many more. And there's, like different flags that we can put, which are like parameters for those commands. But you're you learn them ass you as you use them Azaz. We go through the 30 course, but for now, that's Ah, that's a very quick introduction to the terminal commands.
8. Python Shell: So let's start playing a little bit with Python and we're gonna use the terminal again. Time will maximize this here. Um, with cloud nine, we have an option to use sports by Thorn to and buy from three by phone to is still very much in use because there's some libraries that still haven't been ported to buy from three . But I would say these days, most off the off, the useful or most common libraries and frameworks have been updated. So I'm definitely start. And I would start using python three from from this point on, Um and you know, it's it's ah, It's a good thing that we start using by from three projects to, um kind of like move our community or python community towards that, that newer version. So the way we access, if we use only python like this, we're gonna use we're gonna be basically using Python 2.7, which is the the last two version you can do dash V to see to check the version of it. So as you can see by phone, 2.6, 2.7 point six I mean, is what you get from python But we can also use Python three by just typing by from three, and then you'll see that we have 3.4, which is the latest by phone version. So that's that's good. So, um, there's there's a way to play with my iPhone and that's through the python shell. And the way you do that is you just use your state by phone or by from three and then press enter and you'll enter this Ah ah, basically, uh, terminal, where you can play with and do, like, small kind of functions and get to know by son better. So let's start doing some commands and start playing with it.
9. Arithmetic Functions: Okay, the first thing we're gonna do is, um, use by phone as a calculator. Yes. So you get an idea of what things we can do. Um, if I type through plus three, I get five. So, you know, that's that's, ah, basic stuff in there, but, yes, you get a feel for it. So three minus one is to for multiplication. Used to star three times eight for division used to slash 10 divided by two. Ah, One thing you'll notice is that in this operation we got a what's called a floating number . So it wasn't five integer body was five point. Oh, that's because my family is basically kind of like, uh, advancing or forecasting that you might get not, um, integer number. So if we do then divided by three, you'll get 3.3333 which is, you know, the floating number. Um, we can also do, um, exponential by doing two asterisks. So to the power of three is eight. Um, and you can also get the module is which is the reminder of a division. So 10 modules, three iss one because you know, 10 divided by three is three and then you get one more as the, um, seem arduous. Um, the last thing here's like we can, um, group terms together because usually divisions and modifications come before substructure in and addition, for example, if we do two plus three, uh, times five. What will see here is that the multiplication comes first, so it's 15 and then it'll add to two, which is 17. But if we wanted to do the two plus three first you put a parenthesis there and then in that in that case will get two. Plus three is five times five is 25 so that's kind of like basic arithmetic functions.
10. Variables: one key concept in by phone and in other languages is the concept of variables and viable czar basically boxes where you can store, um, some value in it. And then we can reference that value from from that boxes name, so to speak. So let's say if I have, say, a viable called X, you assign it a viable using the equal command, and then you do three. So from now on, X is equal to three. To see the value off a viable, you can use the prin command. So you do print Were you spying this season? Python three used to be print with apprentices X on python to So now we get the value of it . Um, because it's a viable we can change the value whenever we want. So now if I do X equals four and do the print of it, I'll get the do the new value. So as you can see, you can change um, the values off off a viable religiously Um, you can also a sign say we have another viable call. Why? And we can also then now a sine x equals why? And that all that will assign the value off X toe the current value of why, And we'll see why I say that. So if I do print exe now you see that I get seven. But if I change, why toe 10? What do you think? The value of excess the value of X is still the old value. Because this was passed as a value and notice of reference toe the value. So a for for me to change the value of X, I need to, like, reassign x equal. Why X equals y. And then if I do X now, get the updated value. Um, and of course I can. Some those variables, um, explosive y equals 20 um, and you know, do multiplication is and all that. Um another interesting thing is that I can also a sign, uh, strings to viable. So if I do that, say, now Z equals hello. Um, if I pray and see here Ah, you'll see that I have Hello there. And, um, if I have another one, it's a Z Z equals world. If I type c plus zzz, what happens? There is a concatenation. It's not gonna add the values of it, but it's gonna just contaminate the strings. However, notice that we have no spaces in between, which is you know what? We're basically telling it to the self. Refer us to put a space. We would have to do something I z plus quotes plus c z. And then we get the proper hello world. Um, one thing that you cannot do, it's at a a string to a number. We get a an error there because we need to, um, basically convert that one of, you know, the Z toe. Ah ah number which is not possible. But for example, if Z was one right and C c watts equals to two, if I do C plus easy, I get that era. Right? But if I do end of Z, that's basically convert see into an integer and then I do plus easy, Then I don't get the proper result. Um, so that's more or less an introduction to Virals. We're gonna use them a lot, so we're gonna get pretty acquainted with them as we move on to the course
11. Checking Types: a way to check the type off, the viable or the or the number, not the number about the, um the the term that you're you have is through the Taiko man. So, for example, if I do type off one, it says, it's ah, it's a type off integer. So basically it's, ah, it's an integer number. If I don't type 1.0, then type tells me that's a floating them. That means it has, you know, decimals in it. Um, if I do X equals five and then I do type off X, it's as it's it's an integer because it's it's assigning it to, um to an integer number. So that means the viable is inherits the type off, the off the value on If I change that to a string. Um and then I do type X again. I get, you know, the nuclear new classes. It's a string. Um, one thing that do you have noticed maybe is that I can press the type the arrow top and bottom to kind of like go through history so I don't have to, like, retired things again. Um, and once again, you know, if I do type. Hello? Which is a string I'm going to get type off strength. So that's a useful thing. Toe Know and learn. Um, when you want to, like know what? What? The type off a viable that you don't know exactly what what it is? Um, um, kind of like it's Andi. Schools celebrate as just as you see. Very. It says class, we're going to get into classes in later in this section.
12. Variable Format: one thing that you want to get used to, um or know about is something called Pep eight. So if you go to Google and just search for eight, um, and foot Python just in case you'll see this pit eight, um, guideline. And there's basically the style guy for the whole, like by phone coding. And that includes, like, you know how to use code using taps or spaces. What's the maximum lying length? And it basically goes through all the conventions for, um for those, um, you know, functions. Oh, are things that we normally do when I daily basis. So when you have a chance and you have, like, you know, you're having a long lunch and you want to get used to or get acquainted with all the recommendations for for how you know we type code in python, then you should definitely read this. Um, but in any case, um, going back to variables for valuables, we use basically numbers letters and underscores, um, so basically, you know a good noma Good. Ah, viable name is, um you know my var Sony's I use a an underscore whenever I have spaces in there, so I don't do this. My bar, um or do my capital case bar, which is something that jealous refuses. Um, so on the other thing is like try to make viable names as explained, explicit as possible. Like make them meaningful. Don't don't do like, you know, X X. Like I was doing zzz before That was, that was, that's not a good practice. If you're like writing a riel project, it's better to put, you know, you know, database, um, index value versus just like DB I, you know, try to use explicit names, things that you can. People reading the code. I can't understand what's what's going on. Um, there's also like a uh, it's not. None of this is really enforced, but it's it's again what Bebe dictates. We have a constant, which means it's a number that's never gonna change. We use all caps. So, for example, um, data bays ah, name, for example, equals test. So that's that's kind of like it's a good practice to have caps, because that means whenever the person or the developer reading the code looks at that, he knows. Oh, this is something that doesn't change throughout the code base it's it's Ah, it's a cat, it's Ah, it's capital capital life. So that means it's not gonna change, Um, but there's there's all the things that you should definitely look at and take a look at pervade when you have a chance because it's, ah, it's useful for you to get acquainted with it.
13. Strings: Let's take a look at some strength functions. And, um, and helpers. Um, strings can be expressed as quotes like X equals hello or as singles xolo. One thing to know is that strings are basically a raise, and we're going to see a raise, which in pie thunder cold lists in a little bit more detail afterwards. Spot basically think of Honore as a collection off individual characters. So what that means is that if I do, let's say X off zero. That means that I'm going to get the first character off the string. If I do X off one, I get the second. So as you can see, it's basically a collection or array off the strings. H e l l O. And that's something to remember when you you can kind of, like, get the, um, you know, sub strings off off a string by putting a range off characters. For example, if I do zero calling three, I will get the 1st 3 characters off that string, Um, the same way. If I do three through five, I get the last two characters. Um, the thing is, um, as we were seeing earlier, we can con card innate to string. So if I to why equals? Um hey, then we can do explosives. Why? And e get Hello, Paul. Um, if we want to do, like, the the space between the tool I just insert that space in there. Um, we can convert, um, a string that I mean a number toe a stream by using the str function. So, for example, if I have, it's a c equals three. Remember how we said that we cannot come cut in eight? Um, the integer and a number if you wanted to say hello, Uh, three. We would do X plus str off three off z. So str will convert the number three, which is an integer to us strength and their their works. If you wanted to the opposite, remember? Like if we wanted to have a a string that was, um, basically a number we want to get the value of it. Then we do I nt There's also some methods that we can use that are already built in on the strings. For example, if I wanted to have the hello all in uppercase, I would do x dot offer and, um off That doesn't make a lot of sense, I guess. Um, let's say why don't offer and we'll see Paul all in caps and I want to get them all to lower than we do X off lower. So there are more methods like that. But you get an idea off off some things you want to, uh you know, there there are certain my foot. So you can that you can use and one less one that you'll use often is Len, which is what's the length off a specific string. So, Len off. Why is four which is Paul? Um, so, you know, take a look at string operations. When you have a time, there's lots of them, but these are kind of like the ones that are used most after.
14. Lists, Tuples and Dictionaries: So let's take a look at three. Um, very useful types off variables when it's called lists. Um, list is basically a ah, a list of values that can be numbers or strings or both. So let's say X is one common to come on three. Um, and you close them with brackets, and that means that that's a list. So every print exe you get the whole list even to get type X, You get the type class is list, um so least are very useful if you have, ah, basically an ordered or in order kind of like least off values that are, um you need to get access to. And a lot of times, things that come from like the database are are returned as us lift. So you want, like, be able to look through them and get their their viable their their values. One thing you can you're able to do is loop through a list. Um, but that's something that we're gonna we're gonna look at a little bit later. Um, another type, um, or another, uh, yeah, kind of like different storage. Um, Function or or or class is Stupples and Topolsky is basically used with parts. So you can do you know, X equals one comma too. And that's a Topol. So if you do type off X, you get a Topol. So one thing that separates the list on the two poles is that you cannot once a to police, they find you cannot update the values. So it think of a Topol as a constant of, ah constant list or a static list that you cannot change afterwards. Um, to get both a triple and a list value at a specific position. You do basically, um, x off. Let's say the index so actually X off zero, which is this Topol? It's one x of one is is to So it's ah, it's always you always starts the next at zero something that sometimes we forget, Um and what? Basically, you can get any any of the off the values off that off that list or or to pull using that notation. So let's say that, um, we want toe. I want to show you how the we can change the value off off lease, but not of a Topol. So does the find that ex again as 123 If I do X off, one equals four now if I If I print exe, see that I just replaced That won the second value 24 But if I did this Tupelo 1 to 3 and you'll notice that I put a comma after worst, that's kind of like the the way that you work with topples, you have to kind of like ended with with the coma, even though you're not putting a value there. So if I do why off one equals four, I'll get in there because there's no item