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