The Python MicroDegree: Python Basics To Building Python Applications | Abhishek Pughazh | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

The Python MicroDegree: Python Basics To Building Python Applications

teacher avatar Abhishek Pughazh, I build cool stuff with code.

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

129 Lessons (6h 20m)
    • 1. Why Choose This Course?

      1:17
    • 2. Installing Python

      4:39
    • 3. Installing Visual Studio Code

      1:49
    • 4. Command Line Execution

      1:45
    • 5. Writing Python Code Inside A File

      3:57
    • 6. Quick Tip: Making Your Code Efficient

      0:26
    • 7. Assigning Variables

      3:30
    • 8. What Is Type Function?

      3:06
    • 9. How To Use Lists?

      2:10
    • 10. Attributes

      3:35
    • 11. Calculating Average of a list

      7:00
    • 12. Best Way To Learn Python

      1:45
    • 13. What are Dictionaries?

      1:54
    • 14. Using a Dictionary

      2:48
    • 15. Tuples Vs. Lists

      1:57
    • 16. Getting Rid Of Command Line Clutter

      1:25
    • 17. Lists: Append & Clear

      2:40
    • 18. Lists: Finding The Index

      1:10
    • 19. Lists: Finding Elements Using Index

      1:42
    • 20. Lists: Slicing

      2:56
    • 21. Lists: Negative Indexing

      1:33
    • 22. Indexing Property Of Strings

      2:03
    • 23. Dictionaries: Using Indexing

      3:10
    • 24. Functions & How To Write One

      5:02
    • 25. Function: Return Statement

      2:55
    • 26. Replacing Lists With Dictionaries

      1:32
    • 27. Introducing If Statements

      2:48
    • 28. The IsInstance Function

      1:50
    • 29. Introducing If-Else Statement

      1:25
    • 30. User Inputs: Introduction

      1:09
    • 31. User Inputs: Lesson 1

      2:52
    • 32. User Inputs: Lesson 2

      4:35
    • 33. String Formatting: Real Life Example

      4:17
    • 34. String Formatting Using Two Variables

      2:16
    • 35. Introducing: For Loops

      2:10
    • 36. For Loops: Lesson 1

      3:15
    • 37. For Loops: Lesson 2

      2:50
    • 38. Introducing: While Loops

      3:30
    • 39. Password Checker With While

      3:05
    • 40. Cont'd: Version 2

      3:40
    • 41. Try & Except

      6:24
    • 42. Hierarchy Of Exceptions

      2:41
    • 43. Try & Except (For Developers)

      2:41
    • 44. "Else" in Exception

      1:39
    • 45. Finally In Exception

      2:12
    • 46. "Raise" Exceptions

      1:55
    • 47. Micro Project: Question Recognition

      1:37
    • 48. Building The Algorithm

      2:08
    • 49. Designing A Function

      6:48
    • 50. Using Loops To Our Advantage

      6:08
    • 51. Formatting The Output

      4:06
    • 52. Introducing: In-Line For Loops

      2:44
    • 53. Introducing: In-Line If Statements

      1:26
    • 54. Introducing: If-Else Statements

      1:18
    • 55. Multi-Argument Functions

      1:48
    • 56. Arguments: Keyword & Non-Keyword

      1:49
    • 57. Parameters: Default & Non-Default

      1:52
    • 58. Possible Error Zone

      0:46
    • 59. Non-Keyword Arguments

      3:22
    • 60. Keyword Arguments

      2:22
    • 61. Introduction: File Processing

      1:21
    • 62. How To Open Files In Python

      2:53
    • 63. File Cursor

      2:35
    • 64. How To Close Existing File

      2:13
    • 65. "With" Context Manager

      2:02
    • 66. File Directories

      2:01
    • 67. Mode "r"

      2:36
    • 68. Mode "w"

      3:45
    • 69. Mode "a" & Mode "a+"

      4:04
    • 70. InBuilt Modules

      1:32
    • 71. Using Inbuilt Modules

      4:01
    • 72. Exception Handling

      2:09
    • 73. Import OS

      2:55
    • 74. Mini Project: Password Fort

      3:09
    • 75. Finding Replacements

      2:07
    • 76. Using Tuples To Store Data

      1:43
    • 77. Getting The Inputs Ready

      1:42
    • 78. Replacing The Password Elements

      3:21
    • 79. Processing User's Password

      2:51
    • 80. Conclusion

      3:00
    • 81. Mini Project: Guessing Game

      2:07
    • 82. Approaching The Problem Statement

      0:39
    • 83. The "Random" Module

      3:57
    • 84. Greeting The User

      4:14
    • 85. Processing User's Decision

      4:59
    • 86. Calculating Number Of Tries

      4:17
    • 87. Fixing Mistakes

      3:31
    • 88. Application: WordBook

      3:09
    • 89. Understanding The JSON Format

      4:32
    • 90. Converting The File Into A Dictionary

      3:41
    • 91. Creating The Function

      2:50
    • 92. Handling Error Messages

      2:03
    • 93. Recognizing Multiple Cases

      2:05
    • 94. Comparing Incorrect Words

      3:44
    • 95. Getting Close Matches

      5:24
    • 96. Improving The Algorithm

      3:20
    • 97. Getting The Meaning

      5:04
    • 98. Using For Loops To Extract Single Outputs

      6:04
    • 99. Final Test Case

      3:31
    • 100. Application: Currency Converter (Graphical User Interfaces)

      2:34
    • 101. Adding Elements To GUI

      4:47
    • 102. Assigning Functionality To Buttons

      2:22
    • 103. Conversion Syntax

      5:08
    • 104. GUI with Three Outputs

      4:23
    • 105. Application: JumbleBot (Desktop Software)

      2:07
    • 106. Creating A Window

      2:36
    • 107. Adding Elements To The Container

      5:35
    • 108. Backend

      2:48
    • 109. Generating Questions

      4:17
    • 110. Checking If The Answers Are Correct

      4:27
    • 111. Reset Switch & Troubleshooting

      3:16
    • 112. Color Schemes

      2:03
    • 113. Changing The Name & Icon

      2:49
    • 114. Compiling Into A Stand-alone .EXE File

      4:23
    • 115. Essentials: OOPS (Object-Oriented Programming)

      1:35
    • 116. Instance Variables

      3:59
    • 117. Introduction To Class Variables

      4:08
    • 118. Performing Operations Using Class

      2:43
    • 119. Introduction: Class Variables

      4:05
    • 120. Class Variables: Lesson 2

      3:54
    • 121. Introduction: Inheritance

      2:47
    • 122. Method Resolution Order

      1:34
    • 123. Inheritance: Lesson 2

      4:51
    • 124. Python Tip: Ternary Conditionals

      1:56
    • 125. Python Tip: Placeholders

      2:22
    • 126. Python Tip: Context Managers

      1:35
    • 127. Python Tip: Enumerate Function

      2:22
    • 128. Python Tip: Zip Function

      2:44
    • 129. Python Tip: Get Pass Function

      1:33
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

31

Students

--

Projects

About This Class

Before we even begin,

Here are all the resources that you'll need/learn for this course.

CLICK ME LINK TO DOWNLOAD THE RESOURCES

This course covers everything you need to know in Python. 

Most students try learning Python from several different resources and eventually lose their interest and sabotage their progress. If you are a complete beginner in Python, DO NOT WORRY because this course would help you learn everything you need to know in less than a week. We have consciously sculpted the course for absolute Python beginners to make the learning curve smooth for you.

Programming is not just about the basics. This is the biggest picture that most people fail to see. This is exactly why I'm not going to bore you to death by teaching you the basics over and over again. We are going to go nice and slow. Starting off with the installation (Python & IDE) we'll slowly move ahead into the basics. This includes variables, conditionals, loops, functions, file processing, user inputs, modules, etc., Once you know enough to start building applications, we're going to jump right into it.

By the end of the course, you’ll be able to apply in confidence for Python programming jobs. And yes, this applies even if you have never programmed before. With the right skills which you will learn in this course, you can become employable and valuable in the eyes of future employers.

Will this course give you core python skills?

Yes, it will. There is a range of exciting opportunities for Python developers. All of them require a solid understanding of Python, and that’s what you will learn in this course.

Will the course teach me data science, machine learning, and artificial intelligence?

No, it won’t do that – All of these topics are branches of Python programming. And all of them require a solid understanding of the Python language which of course this course would help you receive.

Here's what we're going to build:


1. Question Recognizer (Micro Project)

2. Password Fort (Mini Project I)

3. Guessing Game (Mini Project II)

4. Word Book (Application)

5. Currency Converter (GUI)

6. Jumble Bot (Software)

We are not going to waste any more time! Not even to read the description! Let's Go!

Meet Your Teacher

Teacher Profile Image

Abhishek Pughazh

I build cool stuff with code.

Teacher

This is Abhishek, India. I'm a Python Freelancer. I build cool stuff.

See full profile

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Why Choose This Course?: Unlike other programming languages that are limited to a particular operating system or device, by Don is highly Wednesday. It's used almost everywhere. This makes it a great choice for what beginners and experts. But I know if you're here, you're probably confused because there are a ton of courses out there claimed to teach Python with each having their own syllabus instruction. So what should you choose me? I'll tell you why. Over the years, I've been learning programming from a lot of different resources. But you know what the problem was, information overload. It'll give me too long to even learn the basics and eventually a loose struggling with. But in this course of us, I'm going to teach you all As and choose and court appointed to Python like variables, functions, modules, loops and conditional statements. But imagine are going to make it too much to handle. Okay? I'm not just going to bore you with the concepts, but instead, I'm going to teach you how we can build real-world applications with the things that you've learned. My job is really simple. I just want to make Python easy for you by the end of this course about from either wonderful applications that we are going to be building Eigen promising one more thing. You are not going to be bored of programming anymore and you're Rajah not going be afraid. So why are we reading netstat learning? 2. Installing Python: Hey guys. So the very first step in learning any programming language is to keep it personal computer ready for it. What do we mean by this way? You are probably setting the scores on a Windows, Mac or Linux PC for it. But your OS will not by default how Python installed in it. And it is your responsibility to go in and started the necessary Python version that you need. You also have to install an ID that can execute it by the enclave. Okay? So the very first step is go to www.python.org slash downloads. What you're seeing on the homepage right now is actually the most recent version of Python. And I highly suggest that you install the latest version, okay? Unless you have a very special need, Let's say you're developing a desktop application or a website that particularly needs an older version of Python, you can scroll down the screen and installed the version that you need, okay? But let's say you're a beginner just starting out with Python, I highly recommend that you install the latest version. While I was creating this course, which is by the end of 2020, the latest Python version was 3.9. But this might, maybe based on the time that you're, that you have enrolled in this code, okay, so do not worry if you find another version here, ensuring Python is pretty much pay it forward. You can go ahead and click the download button, okay. Save the flight. Once you have Python installer gets downloaded, you can go ahead and start installing Python. Installing Python is a straightforward process. There is nothing too complicated about it. However, there are certain steps you must know about, okay, The very first step is adding by Don to your path. So this step is going to help us in a lot of places in our code, okay? So basically we are going to be executing it by them placed directly from our command line, okay, our common ground, as most of you guys might know. So this command prompt is going to be there inside that ID. And we're going to be executing at a Python version from DO command link directly. Okay? So if you fail to take this tick box in this step, we'll be encountering errors later in the course. Okay? So do not forget which had this tick box at this point of installation. But apart from this, starting by Don, really simple process, okay, There's nothing too complicated about it. So go ahead and click the Install button. This beautiful installation is highly dependent on how fast your computer is in general, okay, if you have a faster computer, this installation should take no more than two minutes. But even if it takes away, do not worry. Hang on. Okay. Alright, so if you're here, you have successfully installed by dont do not do anything. Go ahead and close the installer. Okay? Your system is almost ready to run Python. Python show you a quick example, okay, I'll show you a quick example of how Python is going to work. Open your command prompt, type by Don and hit enter. Okay? If you can see three rightward pointing arrows at this point, it means that they're coming down to successfully running the Python that you've installed in your system. Okay? Right. So I told you that he can type Python code statically do your commanding, correct. I know you do not take their checkbooks that was there previously. I'll show you how it works now. I'm going to type a really short Python code. Now, I'm going to do a really short mathematical operation. If you can see I got made associated, but have not even declared a variable. Okay? This is the beauty of Biden. At least for the most part, you can work without even declaring Mary was. Okay. Okay. So we haven't started by Don now, but this won't be enough. We also need a software, an ID, which will run the Python phase. The definition of an ideas integrated development environment. You'll need an ID to extract by Don, phase and random and your system, okay? Executing the Python phase data Kenya command length might be suitable for testing purposes. But in the long run, it won't work because your Python files are not getting saved anywhere, okay, if you shut down your system and open again, you will not find this particular Python being saved and emitting a system. Okay? Let's say you have, you want to have washing control. You want to save your Python files. You want to work on your Python place after the studying a system. This is your need. Then installing Python I, enshrining an IDE is going to be necessary. Okay? I'm going to be installing Visual Studio Code in the next lesson. And I highly suggest that you install, which was record our atom. Okay, we've got an item or two very popular IDEs which most people use. The benefits of using culminate easily Visual Studio Code and atom is that a lot of people around the world are using the same IDs, okay? So if you happen to encounter an error or if you're in a situation where you don't know what to do, you can easily, it is all of this information just by a simple Google search, okay? Because there's a lot of support that he gets to them all around the world. Which is exactly why is that, Is that you enjoy the same ID that I use. In the next lesson, we'll be seeing the installation process. 3. Installing Visual Studio Code: And starting with wisdom of God is no different than installing paid on because the steps are pretty much the same. Cookie. First go to court, ritual studio.com. All right, so just like we did with Biden, the version that you're seeing on the homepage is actually the most recent version. And I highly recommend that you install the latest version. Okay, go ahead, save then install it. And once they install it gets downloaded, initiate the installation process. Okay. So no one would have ever read agreement page before, so he had every right of it. Following this, you'll have to select the destination of adding want your VOC to be installed. Okay? And after this, you'll be seeing a tick box, which you might have previously seen in Python installation. The same ad to paycheck water launch will be the enemy is installation. But this time, you know what to do. Do not forget to take the ship works because we have the same command, ln inside the VOC. Ok, we'll be executing our led by Don phase using the command window that's there in St. Louis, she was really good. Okay. If you feel this checkbox right now, we'll be encountering errors needed. Okay. So did the checkbox and complete the installation. Okay. So this we have installation again will be depending on your sphere of the computer that you currently have. So do not worry if it takes a bit longer, right? We have now successfully installed tuition to the recordings, had a system. From here on out, I'll be letting all adolescents in sandwich in pseudocode. But again, the ID that you use, the choice of your AD is totally your preference. I personally find working VZV comfortable and its color scheme so appealing to me, okay, our demos and other very strong ID that you can use, the operations of the AUC and Adam a nodule different, okay, there are various ideas every level for various operating systems, Windows, Linux, and Mac have that video IDs that he can break. 4. Command Line Execution: So you guys, if you ever I believe you should have all been installed, which actually occur if you haven't already kindly go ahead and install BSE. So we'll start nice and slope. We go, go nice and slow. Start by opening a new terminal. Okay, I'll show you the simplest Python program that you're ever going to write in this course. If you are a Windows user like me, type Python, but if you are using those and a marker and next thing you have to take Python tree explicitly is that okay? So Remus users just type Python and hit enter. Okay, if let's see our max here, that means your vision to your code is now running Python on your system. Okay, So we'll go ahead and buy importing a module called day and time. We're going to be talking about models a lot later in the course, but right now, let us be an introductory step important model called data. And the timber particular module import an object called Date and Time. This, at this time it happens to be, the object happens to have the same, namely the modelling, but it doesn't have to be the same. All right, so dude, don't I module inside the gradient I module, I've imported an object called it in time and a method called enough, okay, and hit Enter. So if you're seeing an output without any errors, that's really good. Because if I assume you are a beginner, so this is a really good step. So right now, what you're seeing on the screen is the precise do your down to the right millisecond. Okay? So if you're here, I'm really happy for you. This is your first Python program that you've ever written. But if you see the screen, this is not a desirable output, right? This looks more like a code and it's not a designed output. So later in the course, we'll see how to see how to make this output a lot more defined and easy to understand. 5. Writing Python Code Inside A File: I know we have a content coroner hands right now, okay, but this Python code is not saved anywhere in the system. So what does this mean when it was essentially accord and open it back again, you will not be able to find this piece of code anywhere in your system. So we first have to save this code inside a file and then execute the exciting. All right, so before we see that, I first explain you the difference between a Python shell and a dominant. Alright? So right now we're inside a Python shell. In order to cover the Python shell, you have to click Exit, open brackets and close brackets. Alright, so now you'll jump out of the python shell and go back to your terminal. Okay? So one of them will be prominent. You can execute files. The name sang, a Python shell. You can straight away go and execute Python goods like we saw previously. Okay? So right now I'm exiting the periodontium and coming to a dominant eye. You can also close the existing terminal and open a new one. That's completely your call. Okay? So now I have a brand new terminal. Will proceed and open a new file. Okay, Boris, I click on Add to workspace and create a new folder where you want to save all your face, okay? Um, any Python, and again, you can name it whatever you want. And the folder, the workspace. Once you've added the folder, you'll be able to see it here. Okay? We have the folder and you can go ahead and add 10 of IC1 to the folder. So to create a new file, you can either go the side and click on new file. You'll also see a button here that says New File. Click that I'm nucleophile. But do not do the mistake of naming of isolating that by okay, because data is a molecule that's already there inside Python dictionary. Okay? So when you give an inlet, this will obviously encounter errors while executing this way. Okay, Show I'm naming of IE6 or Pi. But again, you can name it whatever you want. Okay. Go ahead and type the code that was already there. Okay. Datetime. Well, all right, so once you have read, do not forget to save your code. Would not type according seller side, but we haven't seen indicate. Okay, So click on controllers. Now if I will say to execute a file, go to a terminal. If you're in a Python shell. That is, if you are in a situation like this, come out of the python shell. Okay, come on in the Python shell. And right now we can execute a static secure in the file to execute python solid border name of your file. Basics. Okay? So we don't see any errors, but we also don't see any output. So this is because our course trying to give us an output, but there is no way for it to print the particular output. Alright? So to do that, type a print statement, okay. And includes all the information within the print statement. And click save Control-C. Don't forget to save your code. Right? Now, click on Basic stroke pie. Okay? So on the screen you can see an output that's much more defined. Okay? So if you want to add escape and previous to this output, just add another print statement. And click Save. Okay? If you are here, this is your very first Python program. What we saw before was a piece of code that you type inside a Python shell. But what you're seeing on the screen right now is a full-fledged Python code. You actually have this file on your system, okay, if you go to File Explorer, click on this particular folder and go to this file, you can actually retrieve this fight, okay? You can, no matter how many times you recall, this formula, always going to be there. 6. Quick Tip: Making Your Code Efficient: By Don is all about keeping a code efficient. All right, so let's say you don't want to use to print statement, you can go ahead and remove one. And I've seen within the existing print statement. All right, and now once you type, not forget to save your file. Go ahead and execute the fight. You add. Essentially there's getting the same output, but your code is a lot more efficient notes. So try to reduce the number of lines of code every chance you get. 7. Assigning Variables: We have a Python code here that is giving us a particular output to be more specific. The node method inside the database object in save the date and the module is giving us an output which the pen function is printing out for us, correct. But print is a function and it's not available. Okay, so let's say using one to do this and the moon is out of the print function Building and the print function, as a matter of fact, I'm available. Okay. But you don't happen in a variable. You can give it whatever name you want, Let's say date or time. You can endlessly available whatever you want. Okay. I'm just naming a variable a and closing this intensity within open and close brackets. Okay? After doing this, just print the variable that you've declared and execute your site. Okay, let me execute a file. You can see the same output that you've seen before, okay, which means your code is running perfectly. There's one major thing that you should remember. While many available, you shouldn't be naming a variable bit and operators such as minus or plus, whatever you want when you do this and execute your final obviously encountered errors. So don't go this. You should also be not been aiming of naming a variable with a number is also not do this. I can aid in any variable with an alphabet are a complete word. Okay? So the purpose of using availability to simplify your entire program, okay, So the output of this particular statement in Sanger program are a lot of points. You don't actually explicitly go and pay date and tender date and time dot. Now, you can just go ahead and declare this incentive even at the very beginning of your program. And you can again call the output using this variable, okay, you don't hepatitis Intel statement. And over again, all day, you can actually see a lot of things inside of here. Okay, Let's say you want to save number, okay? But let's say you want to say a word, okay? But don't forget to use double quotations in your ear and you want to save a word or a sentence or a string inside available, okay? Once I get these liquidations, and again, I'm using a print statement to print out which of these variables. Okay? When you click Execute, you can actually see the outputs being printed. I've actually been something here. I've used two arguments inside the function, okay? That is actually a property of brain function. You can actually use more than one argument, okay? Until a pantry here, we've just used one, I mean, one argument inside once in the function, but you can actually bend commonly available She wanted us individually statement, okay. This process is called function calling. Your professors or your college, or you might have actually taught function calling is a really complex process. But in reality it's actually not. Function calling is a really easy process, okay? It's just this simple. You'll have to declare a particular number or a string inside a variable, any variable in a particular point in the program. Again, inside the print statement, you can declare the name of the variable. It has arguments. And what this print statement is actually doing is it's calling the values inside this particular variables. Okay? This process is called function calling. This is nothing complicated. This source input. Later in this course, when you talk about this, you'll actually, you'll actually have to recollect this and think how simple it is already. Do this for me. 8. What Is Type Function?: Let me show you something really interesting with variables. I'm using the BBB to save the number 100. A 100 budding, say double-quotes. Inside someone. I'm adding a plus a and insights some. I'm adding B would be, okay. And again inside a print statement, I'm printing the output or someone and some to click. Okay, when you execute this, you can actually see something very interesting happening here. The someone has actually added the number 100, a 100 and given as 200. But the sound oo, even though it's type the number 100, it's not actually adding a hundred and ten hundred. Instead, it is concatenating a 120, okay? Because computers are not as clever as you are clever, but your computer is actually not that clever, okay? You have to explicitly declare the type of a variable in order to tell your program what kind of variable it is. If you're already familiar with C programming or C plus plus, here, you should actually type in a, our SDLC be. Alright, string B tells the program that you should read this as any easier and you should treat it as a string. But Cantonese easy, you actually joined this course because you type Python is easy rate when Tron impact on you don't actually have to explicitly declare the type. Instead, you have to implicitly declared that by that is, if you are going to type a number in say, double-quotes, your programs OCS automatically going to think that this is a string. Okay? But if you don't take an unvarying seven double coach, your program is going to treat it as a impeded, okay? So right now we've seen origin individuating a string. We want to see what the flu. You obviously know much of load at this point. Decimal numbers are considered as load, okay? If you don't want to believe me, there's an interesting function quite. Okay? So this function is going to tell you the type of available you're using, makes him using a print statement. Type a, type B, type C, Control S, and execute the program. You can actually see an output which is an integer. B is a float, I'm sorry, B is a string and C is a float. Which is exactly what this print statement is telling you. All right, This is the first time I'm referring to the types. The type function to you. And functions really useful function because we are going to be using this type function in real time in a lot of places in our course. Alright, so make a note of this function is going to explicitly tell you the class of the variable that you're using. Okay, It's going to tell you if you're leading an individual or a string, or a float or whatever the type that you're using, okay. 9. How To Use Lists?: I assume you know what is an integer? Float on water skiing. So all these are called simple datatypes. Integers, floats, strings. But there is a whole new topic, a little bit of a compound data types. How many red edges, then you can store a lot of different objects inside a single variable. Okay? The list, a list is most commonly used compound database. I chose a list. Some of you here might be tabbed. Declaring a list is a complicated process. Most of you could have even hated Python because that all of this technical jargon, cities, lists and dictionaries and all this stuff. But became the list is actually a very simple process and it was going to hate you and a lot of different places. Let us assume and give you an example. Let's assume you are a teacher. You are a teacher and a scholar college, and you have a list of 50 students already have official Virginia class. You cannot be clarified. Table from variables a, B, C to copy. Don't even have a plaza which you cannot go. Save all the grades of a group of students inside a single variable you can obtain. It was impossible to attain, I mean, as a insipidus and very ventricle, three different grades. I'm not saying it's impossible, but it's still got time consuming. Larger increase the number of lines of code. But in China, list inside a single variable, you can store your grades of all the students. Okay, I'll show you what I'm talking about. Yet. I'm using the variable click, okay. The syntax for using a list, you have to declare a variable equals open brackets and close brackets. Okay? This is all the synthetic need to know. In order to declutter list. Inside those, you can score, you can store the goods of all of our patients, let's say 90, 80, 70. Or if I'm in your class, are groundless cathodic Selling be on IV. You can get, you can go, you can keep going up to a 100. I mean, you can get 1000, 1000 objects if you want to. That is the advantage. That is the main advantage of using a list. Alright. 10. Attributes: Great. So you know what just login string. You also know what does. All right? So what can you actually do with all this? What do you do with an integer? What can you do with the flow and what can you do with the list? Incidence meta-learning doesn't inbuilt function. Python call it the DIR function. I'll use the Python shell a little bit more. I speak the dominant, and open the one side. In order for you to use a BFS function. Open brackets, close brackets. And we're going to the list. I'll show you what we can do with the string, open bracket, close bracket, and inside the package, paid the database. Whatever database you want to get explained. Hit Enter and here. That can do with a string. Okay, let's see. Okay, So these are the thing that you can do with an inducer. All those are called attributes. I'll write this as a type. The type attributes, they say that's a technical name called type attributes. Lecture. We'll do the same thing. Now. This is written that you can do with lists. These are called attributes. I may, I'm not going explaining this. This is called a pipe listed quite a bit at a string. Let's call it a day in detail. But the things that you can do with the data type is called as attributes. Attribute over the decades. Alright. Let's go to a string thing again. Because it is simple to explain with strings. Alright? See here you can say something heading upward, right? And here you can see something telling us a swap case. I'll show you how to use this. I'll show you a simple examples. Inside the show, I'm typing Python code. I'm storing, students are stored inside a variable. And again, I'm using the upper attributed. Alright? I'll put open brackets. Close brackets. Alright, this is how we should use an attribute. Then click Enter. You can actually see here with David and one let us already, but when you use the upper attribute, it is now changed. At the capital letters are like similarly. I use a string called student in capital letters. Okay? Here you can see the role attribute is converting the uppercase and lowercase. So what IT cases essentially, again, student H1 letters and I'm using the title attribute. Then use the title attribute. The S alone, the stopping little alone, that IT letter is getting converted into uppercase. So this is how you should use attributes, okay? Since CPUs function and the Python will tell you how you can use a directional light. You don't have to Google it. If you want, you can go ahead and Google. But I just want to let you know that there's something inside Python which you can use it for their advantage. In the next lesson, I'll show you how to find knowledge of the string. There's an attribute, but that'll help you find the average of the spring. I tell you what. 11. Calculating Average of a list: So we've seen examples with by using strain rates thing that we can go to smaller doesn't the capital letters, we're going with the capital letters and small letters. We knew and convert it into a simple string indoor, they did Keystone, right? Now Let's do it. Let's try and do something with less snow. Alright, let's try and find the average of all the numbers inside this list. A list is also called as a container or grade anything inside which you can store to be done disclosure campaigner in Python. So let's choose a convenient, Let's try to find the average of all the numbers that are inside this list with the random coil grids. Let's see if there is an inbuilt attributes, just like how we use this to find our string attributes. Let's do the same foot list. Alright? So if it gets me go through all this in and just pause to be lawful for a second. And Catholic go through all this. If you notice there's no attribute. There is no attribute that involves finding a mean of a list. You cannot find an adult with the Chase mean or average or anything like that. A property of a python doesn't necessarily have to be an attribute. All of the attributes rate of a property and say python does not necessarily have to be an attribute. It can also be a function. You remember what a function does auto function to Mondo Hawaii. In order to just type print one, we'll get one into the function. Will work with a lot of different intellectual worldly to Newton print an integer, we can print the floor. You can bend down and died loss or whatever you want, but you can work with whatever you want it. So what we're looking for, literally looking at an average function, our average, looking for something new that will give us the average of all this numbers inside this list paid. Now this average doesn't necessarily have to be an attribute. It can also be a function. All right? We will all follow the same functions and say Python, you can use the same function. But the open bracket, close bracket, dense underscore, underscore, blur out open brackets, close brackets, underscore is followed by buildings and close brackets. Alright. It's a clicker. And expand this. You can see a thing that Python can do. Alright? These are all the functions that the NSA Python's documentation. And if you've got, say look through this, you can pause the video and have a look at all this, all this functions already. These are default functions that are built into Python documentation, okay? But let's also use it to me, the Python functions, let's say you want to process an image already using machine learning or something of the following is a score for it to be included in say, Python's default installation. We installed Python ton of MCA trade through. The file will be huge for it to be installed in your default installation. So you'll have to download those functions manually, uninstall it and you operate on documentation is needed. But right level stats on this, pause the video and see if you can find something that it can give you the average of the string may mean or average or whatever. If you look at it, there's also opening statement, equilibriums as a function rate. That's exactly what you can see bring here. If you look closely, you can also find some, there's a function called sum array. This will help you find the sum of all the numbers that steering shape a particular list, our container, whatever they want to find, what some can-do, just take his son if he paid like this. Show you what a particular sanction can do. Other literary want to find what opening statement can do? A, it'll show you what a print statement can-do. Okay? So you can find the sum of all the numbers in the list using the sum variable. Let's do this. Boat. I mean, I've already been told before Rate My name is available. Do not name available using a function. You can't name a variable with it are and the ultrasound gonna leak out an email with the word called sum because some as a functioning say Python, right? So you've got a cannot name a variable using a word called sum, but he didn't name it. My son was something called it inside my ism. And we also need a function called sum. And inside it. And putting the variable which has all the numbers inside it that I want to get added. Alright? So what this variable is going to do, it's going to give me the addition of all the numbers. Are all are alternately a function that will give me the number of the number of objects that ceiling. Take this list. Okay, they'd never plays. I can see the six objects, but this might not always be the case. You might have 100 objects. So you can anomaly component numbers, you have rate. So it should have a function. And that would give you the number of objects that's done inside a container. If you haven't paused the video and look through this closely, you'll find something called Alien. Okay? I know this one, just typing it directly. Help aliens. So what this will do is you can delete that then the number of items in a container, alright, it behave. You find the number of objects at 0 inside this particular container. So that's like this. I'm using my alien click. Okay? So now we have the sum of all these numbers. And now we also know hominin numbers. And actually we can just go ahead and do my sum. Let beautiful. So don't forget to hit Control S Haldane. Don't forget acidity of a after saving. By the way. All right, so, okay. So this is going to be tricky thing for you because we have already discussed this before. There are no errors, but there's also no Where do you think it is? This pause the video and think if you don't know that until this pause the video and think through. Okay. So this is because we haven't included a print statement yet. Okay? We have an output that the program has no means to print output. So if you can include a print statement and by basic stroke, but yeah, she average of all those numbers. All right, let's get the average of the list. This is always a good practice to include a sentence in your print statement. Alright, your output will look a little more defined. Okay, beautiful. That's awesome. Clap for yourself. 12. Best Way To Learn Python: And also you belonged by Diocletian. Below steps that you need to follow, you first have to understand the syntax of radon. So what is this index? Here we have a list. Alright? So in order for you to declare a list, you have to know that at least has to start with a square bracket. And then with the square bracket, all the objects inside of lists should become separated by commas, right? So similarly, when we use a function called sum, or when you call a function called lint. When you call a function, each boundaries enough obey the function. You should have open bracket and close bracket, and inside it you have to have a variable or attribute of what do we want to call it. Alright, so knowing the synthetase and other important step. Similarly, when you use a print statement, you'll have to us, the objects within it within a function. Should we separated by commas? If you want to include a string inside of plants, will have to put it into a double conditions. So all of these commanders syntax, any Peyton learned should not sure understand the syntax first, second after and astonishing bags, you can slowly move to thinking about algorithms. All right, So as an algorithm, so this program sheltered finding the average of all listed. This line is all the garden. But enroll in this program, we need to find the average of a list. In order to find the average of a particular number of objects, you'll have first have to find the sum, and then you have to move on to finding the number of objects that you probably have. If you know this, if in order to go out to them, you can move ahead to meet you. Even start writing a good, alright, so these are the only two elements that are added when the stop codon. 13. What are Dictionaries?: You probably know what illustration. But there's another commonly used compounded at a dictionaries. So Howard lists and dictionaries. I'll explain the students that are using the example I gave with ASM that you had a degenerate, you have a set of grids here, alright? But you don't know the origin of all this data. You have a particular amount of data here, but you don't know where it came from. You don't know which students scored 90. You don't know what students called AD, you don't know which students scored 70 because this doesn't completely which you just have the bevel you don't know the common belongs to, right? So we are going to solve this problem by using big studies. Lecture. By using the same will be called goods. Unexplained injuries to you. The syntax of products to lose a little bit different from a big city, you have to use curly brackets. Other, you shouldn't be using square brackets, just like how we did with a list. You'll have to use curly brackets. Open curly bracket as victory has two elements. It has a key and has a value. Alright? So this is going to be the basic syntax of a dictionary. A dictionary we have a key and it'll have a value. Let's say student a. Student B scored 90 MUX. And students, high school students has called one day just for the sake of it. So this is how a dictionary should look like, okay, student, as well as quite a key. Alright, so the mock status code is called as the value. Okay. 14. Using a Dictionary: Awesome, So we have a dictionary here that will show you how to use a dictionary. Okay? I split the dominant again, an open bite on ID on one side. We've already seen how to use the OR function, right? I've shown you how to use it, but the list, I've shown you how to use it with an inducer of strings or whatever you want. This time, we'll use the f function for dictionary. A dictionary paid. Here you can see all the attributes that are associated with our dictionary. Right? Here you can see something called keys, a key method and something named values. This key suppressing this and values the present, the numbers that follow. Alright, I'll show you how to use it. And show you this average program exists. In the previous program, will just died. I will use the sum function and inside it will directly tied grid. But here, the gross variable has keys and values. So you cannot just declare grids. If you just type in grades. It collectively taken keys and the values, and you'll get errors when using extremely. Please use the values attribute here. Okay? Use grids, dot values, open brackets and close brackets. What this is doing, SHE taking all the values over that extended. This method will not come keys at all, okay? This meant a values method will want to consider the values. So this line of code is actually taking all those values, adding it and sending it to this algorithm, right? Don't forget to save your program. Go to Python basic stroke by. If you click, you can see the average of all the numbers, right? So let's say, I'll delete all this. Grids, but keys, open brackets, close brackets. I think this will help you understand a little bit better. If you see the output. The keys method is just taking away the keys from the program. Again, it's taking the keys and explaining it. I'll use another print statement, dot values, and I'm executing it. So here we can see the first print statement is planning on either case. The second statement, the sprinting on legal values. So if you encounter a renal problem statement that if you declared a dictionary inside your program, you should use it like this. You should separate the keys or you should separate the values first in order to use it efficiently. 15. Tuples Vs. Lists: I don't have something called as a tuple. Alright? I'll show you what is the difference between a list and a tuple. Okay? I'm declaring a variable called my list. And I'm storing somebody who is inside it, okay? And again, declaring a variable called mitosis and storing certain objects inside it asks what? If again, notice this, the only difference between a list and a tuple is the kind of bracket that you use, okay? I list has square brackets that as a tuple hash, common brackets, okay? But these aren't the only difference between a listener to open and show you the differences. Let me open it dominant, or they can open an ID and copy paste the same code. But before doing it, ideally something I list is mutable. Okay? But a tuple is immutable. I'll show you what that means in a second. I'll copy paste the same code to the IDE. Let's say I want to do something to the CSA, want to modify this list. I'll tell you something. My list dot append 0.6s. So appended an attribute of a list which will help you add an element to the end of the list array to J1 to add the number 6 to the end of the list. If I again bring the list, you can actually see that the number six is getting added to the end. Because a list is mutable, you can actually modify a list, but a tuple on the other hand, is immutable. I'll show you, um, copy and copy pasting the people link. I'll do the Saturday and do the same thing. Do a little bit. Alright. My dopa got an offender. If I do this, you will obviously see another log is good to know the properties. Array list is mutable, but a tuple is immutable. 16. Getting Rid Of Command Line Clutter: I don't want to show you a quick pick. At this point, some of you should have been confused about it. Some have even Google it and show you something. I have a dominant on the left side. And I'm opening the biodiversity on the right side. Just for the sake of it, I'm using an empty print statement and bring it over and over again. And they'd say, and just executing the go comfortable. Okay, I'm doing it over and over again. Okay? So at this point, you should be, your screen should be a little flattery, right? You should feel a bit of a visual clutter. Okay. I see you how to come out of this. Okay. In order for you to come out of a Python shell, you can just stay exit open bracket, close bracket. When you do this, you'll come out of my control. But still you have on this left of it. This doesn't make your screen anymore. I mean, any better. So if you want to come, if you want to erase just on the whole this press Control L at this point, all right, when you do this, then I guess queen would be cleared. Similarly, do this on the left side, also. Currently not in the Python shell. And this is the dominant, Let's say I'm in a Python shell again, okay, first got out of the exit, open brackets and close brackets. Once you once you came out of the Biden shut, tight control. Okay, press Control. And it'll be free of all leadership letter. 17. Lists: Append & Clear: At this point, you probably know and understand what it is. Right? Now, let me tell you the things that you can actually do to a list in order to make it useful Insider program. In order to do this, I'm opening and inside the ID I'm going to use the function again. Okay? So I've actually told you what a, B F function can do previously in adolescence. So DIR, okay? So these are all the things that you can do to a list, okay? I lied on the attributes and methods that starts with the double underscore name to that of lambda squared. Because these are probably built-in functions that you will not be using in your program, but you often you'll only be using the message from up into sort. Okay? These are the one limit dataset it'll be using often, okay, Very often new program. I start with append the very first thing, Okay? Another thing to know how a particular one of these methods work. You can again use the function called list. The element that you want to know that in this case I want to know what an append can-do list dot. Okay? So this will give you a sharp definition of what the append attribute can do. An append can actually add an object to the end of your list. Okay, now let's try to use append in a program. I'm going to use the same list. I'm just copy pasting it. Now. My list dot append. And inside the open bracket and close bracket, type the number that you want back to the end of the list. Number, the object, the object that you want to act to the end of the list, let's say one black, then we'll end up with this and take lambda, your list. And now you can see the number n being added to the end of your list. And next, let's try using the clear method. Similarly help listed here. So here you can see the clear function, I mean the, the clear material that help you remove items from a list by using D7. Now I'll again copy, paste the same list. My list dark, clear, open brackets and close brackets. I'm just printing the list again. If you can see there are no elements inside that, that's because the clear method has actually cleared all the elements from this. Again, if you want to add, you can again use the append function, okay? So you'd append method to add elements to your list. And let's say I want to add one. If you've been in the list now you'll see the number 1 being added to the list automatically. Alright. 18. Lists: Finding The Index: And one last example before we start, okay, I'll show you how to use an index method on a list, okay? Again, type help index, sorry, list, dot index. The index method by definition will help you find the position of a particular element in a list. Okay, I'll show you a practical example and again, copy paste in the same list. My list dot index. Inside the open brackets and closed brackets, you should type the element. You should give the element whose position you want to find. Let's say I want to find the position of the element one. Type one inside the open and close brackets and hit enter. Okay? If you see here, the output is 0 because the position of the element one in this list is 0, okay, a programming construct, the first element is 0, the second element is one. The third element has to ability nor this branch. Okay? So in that vein, definition will help you find the position of a particular element in list. Okay? This is another method which is going to be of great use that in the course. 19. Lists: Finding Elements Using Index: In our previous lesson, I showed you how you can find a position of a particular element inside the list using the index method right side here. But let's say you want to do the opposite. Let's say you have a position on hand and you want to find the element that sitting on that particular location or position. Okay? This is actually a function. It's right here called honest 1mis1. Good, I think I know I know I wrote it. You can ignore the methods that starting with undoes wasn't any redundancy. But until you bank example, it is always good to know, Okay. I'm just copy pasting the same list. My list dot underscore, underscore data item. I'm just gonna underscore. And since this is a method, do not forget to put open and close brackets. And inside this bracket, just statement that position of an element that you want to find. Let's say I wanted to find the element that sitting on the third position. Okay? You hit Enter. You can actually see that I don't want because 0123, the number four, is actually sitting on the third position. Okay. But I'm still going to stick to my promise because I promised you that he can go ahead and skip the underscore, underscore attribute shape. There is a veto, skip it. The same list, my list. Instead of typing, I'm just gonna underscore, get it. I'm an oil. You can just use a bracket straight away. Okay? Let's say you have a position and you want to find the element that's sitting on that particular location in your list. Okay? I use the same position, three and press Enter. This will give the same output that this ID attribute is giving you. Okay? It's that simple. 20. Lists: Slicing: Now before we move ahead, I'd like to give you a quick recap. Is that all right? So first, I taught you how you can find that you mix up any particular limit inside the list. And followed by this, I also told you how you can extract any elements from your list using its index. Identical. How, again, I'm opening my ID, I'm using this list. Okay. You can use the index method to know the position of any particular limit in your list. Let's say I wanted to find the position of the object 84. Know, I'll get the index method will give you the position or the index of any particular element inside your list. Okay? Now let's say you already know the index off an element and you wanted to find which element it is. Okay? Let's say I wanted to find the element that's hitting the position for you hit ended this evening. Square brackets we give you the element will extend the element that's sitting inside that particular position. Okay? It's that's input. And now let's say you don't want to extract a singular limit. Okay? This is going to be odd lesson. Now let's say you don't want a single element extracted. You want a group of elements. You want to extract a set of five numbers from the list are together, okay? You've got manually typing or you get, you don't have to manually type this fight banks, okay? Instead, you can do something like this. It almost the same square brackets, but using an operand lower limit, letting you want to extract the numbers were in the position. Will the position seven, Plessy, okay, and hit Enter. So you build this, this syntax will help you extract all the numbers. That's a thing inside that particular limit. All right? Let's say you don't want to declare a lower limit, okay? You don't have to declare a lower limit and upper limit. And I show you how. If you don't declare a lower limit, okay, you don't get a lower limit and just excite an upper limit. I'm sure I have made a mistake here. I use curly brackets. Okay? You're not declaring an autonomic and just declaring an upper limit. So what this will do, it will extract all the numbers from the beginning. Yet upper limit, okay? Someone I really don't want to declare an upper limit distance. You don't want to declare an upper limit, but you're declaring a lower limit. So what this is doing, this is extracting all the elements from one lower limit told end of the list, okay? This has hovered, extract a set of numbers from it, okay? If we want to extract one single number, you can just type in that single position. But let's say we want to extract a group of numbers. You can use the upper limit and lower limit concept at this process is quite lists splicing, okay? But it's always good to know the terminology. This causes quite a displacing. So essentially you are extracting a set of elements from your list. Okay? So this process is called splicing. 21. Lists: Negative Indexing: I've never done one speed of similar, but at any restaurant concept called negative indexing. Okay. I flesh or you wanted us. I'm opening my IDE and copy pasting the same list through the ID. Okay. I'd like to give you us my desk, Okay, I want you to extract the last element from this list on what I'm going to lift you up using. Okay, pause the video, go ahead and accept the last element from your list. Automatic. So if you have closely followed the lectures before, I assume you would have been something like 0, 1, 2, 3, 4, 5, 6, 7. Okay. I assumed that you would have used this method, right? But you can also boulders and other B. I don't. Again, you can onshore use negative index, the concept of negative indexing by doing something like minus1, Okay? Why using negative indexing, you have to start counting from minus one, minus two minus the minus, minus what you should count and through us. Or you can also use this as lower limit and upper limit. Let's say you want to extract all the numbers from minus four to minus two, okay? Something like this. But limited minus 4. Okay? This is how you use the concept of negative indexing. This is essentially the same thing, Okay? You don't have to convince, I mean, confused between the normal indexing and negative indexing concept. This is a huge one interview question that most