Python for Decision Makers and Business Leaders Transcripts
Chapter: What is Python?
Lecture: Python is 4 different things

Login or purchase this course to watch this video and the rest of the course contents.
0:00 In this chapter, we're going to talk about what Python is, and what it is not. Understanding what Python is, what constituent parts
0:09 make it up, helps you consider whether those parts are valuable to you, and talk about the right level. Are we comparing programming languages?
0:16 Are we comparing ecosystems? Are we comparing libraries? Is it matter that it's open source or not? What is open source?
0:22 All these things we're going to talk about in this chapter. Well, let's start off with a really quick and easy one.
0:28 Python, despite what you may have seen despite the logos, is not about snakes. Yes, this right here is the official trademarked Python logo.
0:38 It is caricature of two snakes. You can see little snake eyes a blue snake on the top, and a yellow snake on the bottom.
0:45 Despite that being the official logo Python was actually named after Monty Python the British comedy skit group, not Python the snake.
0:56 It doesn't really matter, but just so you know Python is really about Monty Python, and having fun. Not so much about the snake.
1:04 More seriously though, Python is not 3 but in fact 4 things at once. Here, this is Python, and this is our first bit of code.
1:13 We haven't even seen any programming yet and this one is really simple. Like I said, I know you may not be a programmer
1:19 but you can probably look at that for a minute and determine what would happen here. So this is what we call a function.
1:25 If we call the function, we can pass it data. Name, that's the purple thing there. So I could say something like, Hello World, Michael.
1:33 And then what would happen, on the screen it would print out two different lines this is Python code, nice to meet you, Michael. That's great, right?
1:41 So we would see that come out. And this actually is the Python programming language. So when someone says, I want to compare C# to Python
1:50 they may be talking about the way you structure code and what you have to write down here. But that's a very limited view of a programming language.
1:59 Some programming languages, that's mostly what they got but many of the popular ones, Python, Javascript .NET, and so on, they have much more.
2:08 So when you talk about them there's actually these layers that build. The next layer up is a rich standard library.
2:15 You often hear in Python the phrase that it comes with batteries included, and when people say that they're talking about this standard library here.
2:23 And the idea is, there are many little libraries are utilities that you can use to greatly simplify the code that you have to write
2:30 in the programming language here on the left. So, in a language like C++, if I wanted to take a whole bunch of repeated data
2:38 count how many times each one of them repeats and then sort them by how many times does it appear what one is the second most common
2:45 how many times does it appear that might be like, 10 lines of code and you've got to think about the algorithm.
2:50 You could make mistakes, but you got to think about it. In Python, there's built in libraries. I could just go, create a Counter
2:57 and say Counter, give me the most common grouping of this. It will do that grouping, it'll do that sorting
3:01 and boom, two lines of code, you have the answer you don't have to think about it. That's what we mean when we talk about
3:06 a standard library, or a base class library. These rich little libraries that I can use to not do absolutely atomic building blocks
3:14 and do everything from scratch, but in fact to build with much larger, more functional pieces. Taking that idea further outside of
3:23 what Python is delivered as, if I go to Python.org and download it, I get the first two things on the left.
3:28 But really when people talk about the power of Python and you can do so much with it they're thinking of third party libraries as well.
3:35 And Python has this thing called a package manager and the Python Package Index, which gives us access to literally hundreds of thousands of libraries
3:44 some of which, you know, maybe just one of those is the Django web framework, or one of those is the Jupyter Notebook system.
3:51 Obviously those are actually built up of a couple libraries each, but you get the idea. There's hundreds of thousands of extremely useful libraries.
3:59 We're going to explore those a little bit. When they talk about Python, sometimes they're talking about
4:04 this ecosystem, like of language plus the library but really all the libraries that are out there, open source or not.
4:11 And the fourth one, it's hard to overlook, the people. Brett Cannon, one of the core developers of Python
4:18 one of the guys who builds Python, creates Python and pushes it forward, has a great saying. He says, I came for the language
4:24 I stayed for the community. And Python's community is fairly unique. It's very welcoming, it's more diverse
4:31 it's people who really, really want to be there. Python often is a language of developer choice not something they're told they have to use
4:39 but something that they rearrange their careers so they get to use. So the community is very passionate
4:45 it's built up of millions, literally of millions of programmers and other folks who program with Python. So Python is these four things here
4:54 the language, libraries, ecosystem, and the people. When people say Python is valuable or I'd like to compare this against this other thing
5:03 figure out what level they're talking about and make sure you're comparing apples to apples.


Talk Python's Mastodon Michael Kennedy's Mastodon