Latest / CyberSecurity Summary / A Beginners Guide to Python 3 Programming
Transcript
- 0:00Speaker 1: Welcome back to the deep dive. Today. We're getting into
- 0:02Speaker 1: the foundations, specifically Python three programming.
- 0:06Speaker 2: That's right, and we're basing this on some really solid
- 0:09Speaker 2: material excerpts from a Beginner's Guide, part of the Undergraduate
- 0:13Speaker 2: Topics and Computer Science series, peer reviewed expert.
- 0:16Speaker 1: Author right, and the book itself is aimed at people
- 0:20Speaker 1: starting from scratch, maybe zero programming knowledge, but wants to
- 0:24Speaker 1: get them up to speed as capable Python developers exactly.
- 0:29Speaker 2: So our goal here is to kind of pull out
- 0:31Speaker 2: the key takeaways, give you that shortcut to the core
- 0:35Speaker 2: ideas of Python.
- 0:36Speaker 1: Three, distilled version from a trusted source.
- 0:38Speaker 2: Precisely getting the best bits without reading the whole thing
- 0:41Speaker 2: cover to cover.
- 0:42Speaker 1: Okay, let's jump right in Python itself. Is it fundamentally
- 0:45Speaker 1: and maybe what's a key thing that sets it apart
- 0:47Speaker 1: early on?
- 0:48Speaker 2: Sure? Well, at its heart it's a general purpose language.
- 0:51Speaker 2: You hear it alongside CE plus plus T, JavaScript, Java,
- 0:54Speaker 2: that kind of thing, and a really defining characteristic the
- 0:58Speaker 2: book flags immediately is dynamic typing.
- 1:01Speaker 1: Dynamic typing, okay, so that means a variable isn't locked
- 1:03Speaker 1: into one data type.
- 1:05Speaker 2: Exactly, that you can have a variable holding say a number,
- 1:09Speaker 2: and then later on you can assign text a string
- 1:12Speaker 2: to that same variable name.
- 1:13Speaker 1: Python's fine with it, uh huh, unlike say Java or
- 1:17Speaker 1: c sharp, where you declare the type up front and
- 1:19Speaker 1: it's fixed.
- 1:20Speaker 2: Right. That adds a lot of flexibility, which is a
- 1:23Speaker 2: big part of Python's appeal.
- 1:24Speaker 1: Interesting and the name Python it's not about snakes, h No.
- 1:30Speaker 2: Not directly. It was created back in the eighties by
- 1:32Speaker 2: Guido van Rossum in the Netherlands. Yeah, and he named
- 1:35Speaker 2: it after Monty Python's flying Circus big fan.
- 1:39Speaker 1: Seriously, that's brilliant.
- 1:40Speaker 2: Yeah, and the book mentions you'll even find little nods
- 1:43Speaker 2: to the show in Python's official documentation sometimes.
- 1:46Speaker 1: Love that bit of personality definitely.
- 1:49Speaker 2: And yeah, just to confirm we are laser focused on
- 1:51Speaker 2: Python three here as that's what the.
- 1:53Speaker 1: Source covers got it now. The book brings up programming paradigms,
- 1:57Speaker 1: different ways to structure code. It starts with.
- 2:00Speaker 2: Right, Procedural programming is sort of the classic approach. Think
- 2:03Speaker 2: of it like a recipe, a sequence of explicit instructions.
- 2:07Speaker 2: You break the steps down into procedures or functions and
- 2:10Speaker 2: use things like if statements and loops to control the flow.
- 2:14Speaker 1: Like see your Pascal exactly.
- 2:16Speaker 2: Those are prime examples. It's a good starting point to
- 2:18Speaker 2: understand how programs can be organized before we maybe get
- 2:21Speaker 2: into other styles later like functional or object oriented.
- 2:24Speaker 1: Makes sense, but okay, before writing any code, you need
- 2:28Speaker 1: the tools. Setting up the environment.
- 2:30Speaker 2: Yep, fundamental step. The book recommends the most direct route
- 2:34Speaker 2: go to the official Python website Python dot org. Python
- 2:37Speaker 2: dot org, I find the downloads link, grab the installer
- 2:40Speaker 2: for your system, Windows, Mac, Linux, They're all.
- 2:43Speaker 1: There, and part of installing is making sure your computer
- 2:46Speaker 1: can find Python right. The path variable thing.
- 2:48Speaker 2: Crucial point, especially on Windows. You need Python on your
- 2:52Speaker 2: system's path, so you can just open a terminal or
- 2:54Speaker 2: command prompt type Python and it works.
- 2:56Speaker 1: Right, so it's accessible from anywhere exactly.
- 2:59Speaker 2: The book also really pushes using a good code editor
- 3:03Speaker 2: or even better, an ID an integrated development environment.
- 3:07Speaker 1: So something more than just basic notepad.
- 3:10Speaker 2: Definitely. It mentions Sublime text as a good text editor
- 3:14Speaker 2: to start with. It understands Python syntax does color coding
- 3:17Speaker 2: makes things much easier to read, okay, but for more
- 3:20Speaker 2: involved projects. It flags a full ID as being really beneficial.
- 3:25Speaker 1: And the recommendation there is pie Charm PI.
- 3:27Speaker 2: Charm from Jet Brains. Yeah, it's described as a full workbench.
- 3:31Speaker 2: It has code completion, debugging tools, integrated version control like get,
- 3:36Speaker 2: lots of features that become really helpful as you progress.
- 3:38Speaker 1: Jet Brain's website for that one, and the example code
- 3:41Speaker 1: from the book itself.
- 3:42Speaker 2: Two main ways suggested. If you've got GET installed, you
- 3:45Speaker 2: can just use get clone with the GitHub link provided
- 3:47Speaker 2: in the book, or if you don't have get, then
- 3:49Speaker 2: you can usually just download the whole thing as a
- 3:51Speaker 2: ZIP file directly from that same GitHub page. And as
- 3:54Speaker 2: the book knows, IDEs like pie Charm often have Get
- 3:56Speaker 2: built in any way, which makes cloning easier.
- 3:59Speaker 1: Okay, environments now the traditional first program Hello World, the classic.
- 4:04Speaker 2: It's really just a sanity check, you know, does the
- 4:07Speaker 2: interpreter run? Does my editor save the file correctly? Are
- 4:10Speaker 2: the settings okay?
- 4:11Speaker 1: And Python files usually have the dot pi extension correct.
- 4:14Speaker 2: Dot PI is the standard and the key piece of
- 4:17Speaker 2: code for Hello World is the print function that's.
- 4:20Speaker 1: Built in part of Python itself.
- 4:22Speaker 2: Yep, a fundamental built in function. It's how you tell
- 4:26Speaker 2: your program to display output on the screen.
- 4:29Speaker 1: Then the book makes it interactive pretty quickly with input.
- 4:32Speaker 2: Right flips the script dot input. Let's the program ask you,
- 4:36Speaker 2: the user, a question, it shows a prompt.
- 4:38Speaker 1: Message whatever text you give it.
- 4:40Speaker 2: Exactly, then a weads for you to type something and
- 4:42Speaker 2: press enter. Whatever you typed comes back into the program
- 4:46Speaker 2: as a string as text.
- 4:47Speaker 1: Data, which means you need somewhere to store that input
- 4:50Speaker 1: enter variables.
- 4:51Speaker 2: Perfect lead in variables are essentially named storage spots in
- 4:55Speaker 2: the computer's memory. You give a piece of data a name,
- 4:58Speaker 2: a label so you can refer to it.
- 4:59Speaker 1: Later username in the example exactly.
- 5:02Speaker 2: And dining back to dynamic typing, that username variable holds
- 5:06Speaker 2: the string from the input function, but you could theoretically
- 5:09Speaker 2: assign a number to username later if you want it.
- 5:11Speaker 1: So the sequence print Hello World, then username input under
- 5:16Speaker 1: your name using the equals sign.
- 5:19Speaker 2: The assignment operator right assigns the result of the input
- 5:21Speaker 2: function to the variable username, and.
- 5:24Speaker 1: Then print hello username. That shows print can handle multiple things.
- 5:28Speaker 2: Yeah, you can give print multiple arguments separated by commas,
- 5:33Speaker 2: like the literal text hello and the value stored in
- 5:36Speaker 2: the username variable. It prints them out, usually with a
- 5:39Speaker 2: space in between by default. A neat little demonstration.
- 5:42Speaker 1: Simple but covers input, output, variables, assignment. Nice.
- 5:46Speaker 2: It's those core building blocks.
- 5:47Speaker 1: Okay, let's talk more about those building blocks, the basic
- 5:49Speaker 1: data types.
- 5:50Speaker 2: The source focuses on four key ones to start strings,
- 5:54Speaker 2: text numbers, integers and floating point Boollian's true false, and
- 5:58Speaker 2: this special value none.
- 6:00Speaker 1: Strings first, text inside quotes yep.
- 6:02Speaker 2: Single quotes like this or double quotes like this functionally
- 6:06Speaker 2: identical in Python. The book mentioned single quotes are maybe
- 6:09Speaker 2: slightly more common sort of the Pythonic convention, but both
- 6:12Speaker 2: work fine.
- 6:13Speaker 1: And strings aren't just static texts. They have operations methods.
- 6:17Speaker 2: Oh yeah, lots of useful built in methods, things like
- 6:20Speaker 2: split to break a string into a list of words,
- 6:23Speaker 2: starts with or ends with to check.
- 6:24Speaker 1: The beginning or end case checking two dot I supper
- 6:27Speaker 1: eyes lower.
- 6:28Speaker 2: Or dot isselfa to see if it's all letters. Very
- 6:31Speaker 2: handy stuff, and case matters in comparisons.
- 6:34Speaker 1: So Python is different from Python absolutely.
- 6:36Speaker 2: If you want to compare strings regardless of case, the
- 6:39Speaker 2: usual trick is to convert both to lower case first
- 6:43Speaker 2: using dot lower so misstring dot lower Hello. Method names
- 6:48Speaker 2: are also case sensitive, naturally.
- 6:49Speaker 1: The book also mentions a way to format strings using
- 6:52Speaker 1: string dot template.
- 6:54Speaker 2: Yeah, that's one method. You create a template with placeholders
- 6:57Speaker 2: like two hood and then use the dot substitute method
- 7:00Speaker 2: to fill in those placeholders with actual values. There's also
- 7:03Speaker 2: dot save substitute, which is useful because it won't raise
- 7:06Speaker 2: an error if you forget to provide a value for
- 7:08Speaker 2: a placeholder, It just leaves the placeholder texts.
- 7:10Speaker 1: As is, moving on to numbers, integers and floats.
- 7:14Speaker 2: Integers are whole numbers like ten naked five zero zero.
- 7:17Speaker 2: Floats are numbers with a decimal point like three point
- 7:20Speaker 2: one four next zero point five. Python uses a standard
- 7:23Speaker 2: format called i EEE seven five to four for.
- 7:26Speaker 1: Floats, and you can convert between them.
- 7:28Speaker 2: Yes, using the end and float functions in three point
- 7:31Speaker 2: nine O three boards. It truncates, just chops off the
- 7:34Speaker 2: decimal part, doesn't round. Float five gives five point.
- 7:37Speaker 1: Zero arithmetic a standard plus heat division.
- 7:40Speaker 2: Okay, division's interesting. The single slash always results in a slot.
- 7:44Speaker 2: Even four to two gives two point zero always a
- 7:46Speaker 2: float always if you specifically want integer division the whole
- 7:49Speaker 2: number result, throwing away any remainder you use the double
- 7:52Speaker 2: slash move. So five two is two got it.
- 7:54Speaker 1: For float division? For integer division, and.
- 7:56Speaker 2: If you mix types like adding an integer in a float,
- 7:59Speaker 2: the result will always be promoted to a float makes sense.
- 8:01Speaker 1: Boolean's next true and.
- 8:03Speaker 2: False the bedrock of decision making capital T capital F.
- 8:08Speaker 2: The book points out a slightly quirky detail. Technically, there
- 8:10Speaker 2: are subtype of integers really and true is one and
- 8:14Speaker 2: false as zero, and conversely boole one is true, zero,
- 8:18Speaker 2: zero is false. Non zero numbers are generally true, zero.
- 8:21Speaker 1: Is false interesting connection, and the last one. None.
- 8:25Speaker 2: None is Python's special way to signify the absence of
- 8:28Speaker 2: a value. It's not zero, it's not an empty straying,
- 8:30Speaker 2: it's just nothing. It has its own unique type none type.
- 8:34Speaker 1: When would you use it?
- 8:35Speaker 2: Often is a default value, or maybe a function returns
- 8:39Speaker 2: none if it couldn't compute a result for some reason.
- 8:41Speaker 1: And checking for it. The book says, use is none.
- 8:43Speaker 2: Yes, variable is none, or variable is not none. That's
- 8:46Speaker 2: the preferred, most reliable way to check if something holds
- 8:49Speaker 2: the none value. Using none can sometimes work, but is
- 8:53Speaker 2: safer and more idiomatic.
- 8:54Speaker 1: Okay, data typees covered now. Making the program do things
- 8:58Speaker 1: based on conditions or repeat actions control flow if statements first.
- 9:02Speaker 2: Right, the fundamental decision maker if condition. If that condition
- 9:06Speaker 2: evaluates too true, the indented block of code underneath it runs.
- 9:10Speaker 1: If not it's skipped, and that indentation is crucial absolutely
- 9:14Speaker 1: non negotiable in Python.
- 9:15Speaker 2: Unlike languages that use curly braces, Python uses white space
- 9:19Speaker 2: the indentation level to define which lines of code belong
- 9:22Speaker 2: to the If block or else or loops or functions
- 9:26Speaker 2: get it wrong, you get errors or incorrect logic.
- 9:28Speaker 1: The standard is four spaces four.
- 9:30Speaker 2: Spaces per indentation level is the strong convention.
- 9:32Speaker 1: Yeah, okay, So if block runs code if true, what
- 9:36Speaker 1: if it's fault?
- 9:37Speaker 2: That's where else comes in ye if condition total one
- 9:39Speaker 2: block runs if true, the other runs if.
- 9:41Speaker 1: False, and for more than two options you use.
- 9:44Speaker 2: Lf sure for else. If if condition one, l if
- 9:47Speaker 2: condition two, l's condition three, I guess. Python checks each
- 9:50Speaker 2: condition in order. The first one that's true gets executed,
- 9:53Speaker 2: and the rest, including the final else, are skipped.
- 9:55Speaker 1: Can you put if statements inside other if statements?
- 9:58Speaker 2: Sure? That's called nesting really valid, though deep nesting can
- 10:01Speaker 2: sometimes make code harder to read. The book also briefly
- 10:04Speaker 2: mentions if expressions.
- 10:06Speaker 1: What are those?
- 10:07Speaker 2: It's like a compressed ifels that produces a value often
- 10:11Speaker 2: used directly in assignments like result is value a true
- 10:14Speaker 2: if condition else value a false it's a neat shorthand
- 10:18Speaker 2: for simple cases.
- 10:19Speaker 1: Okay, decisions covered. What about repetition loops.
- 10:22Speaker 2: Two main kinds while and four. A while loop keeps
- 10:27Speaker 2: executing its block of code as long as its condition remains.
- 10:30Speaker 1: True, so you need to make sure that the condition
- 10:33Speaker 1: eventually becomes false exactly.
- 10:34Speaker 2: Otherwise you have an infinite loop, and you usually need
- 10:37Speaker 2: to set up the variable used in the condition before
- 10:39Speaker 2: the loop starts. And loops four loops are generally used
- 10:42Speaker 2: when you want to iterate over a sequence of items,
- 10:45Speaker 2: like all the elements in a list, where characters in
- 10:47Speaker 2: a string or specific range of numbers.
- 10:50Speaker 1: Often clearer when you know how many times you need
- 10:52Speaker 1: to loop.
- 10:53Speaker 2: Yeah, or when you're processing each item in a collection.
- 10:55Speaker 2: The structure for item and collection is very common and
- 10:58Speaker 2: readable in Python.
- 11:00Speaker 1: What if your looping, say, searching for something, and you
- 11:03Speaker 1: find it early, can you stop the loop?
- 11:05Speaker 2: Yes, that's what the brake statement is for. It immediately
- 11:08Speaker 2: exits the current innermost while or for loop.
- 11:10Speaker 1: You're in okay, and the book mentions a weird four
- 11:14Speaker 1: else construct.
- 11:15Speaker 2: Ah, yes, the loop else. It's a bit unusual if
- 11:18Speaker 2: you're coming from other languages. An else block attached to
- 11:22Speaker 2: a for loop or while executes only if the loop
- 11:25Speaker 2: completed normally, meaning it went through all its iterations without
- 11:29Speaker 2: encountering a break statement.
- 11:30Speaker 1: So if you break out the else's skipt correct.
- 11:33Speaker 2: It's often used in search loops. If the loop finishes
- 11:35Speaker 2: and the elf block runs, it means the break never happened.
- 11:38Speaker 2: Therefore the item wasn't found.
- 11:40Speaker 1: Huh, that's actually quite clever. Okay. As programs grow, just
- 11:45Speaker 1: having one long sequence of code isn't practical. Functions are
- 11:48Speaker 1: the answer.
- 11:49Speaker 2: Absolutely essential. Functions let you package up a piece of code,
- 11:52Speaker 2: give it a name, and reuse it. They're key to
- 11:54Speaker 2: breaking down large, complex problems into smaller, more manageable, testable units.
- 12:00Speaker 1: BOK connects this to something called functional decomposition.
- 12:02Speaker 2: Right, that's a more formal term from software analysis. It's
- 12:05Speaker 2: the process of identifying the main tasks your system needs
- 12:08Speaker 2: to perform, representing them as functions, and then breaking down
- 12:12Speaker 2: those functions into smaller subfunctions, focusing on inputs, outputs, and
- 12:16Speaker 2: the transformation.
- 12:17Speaker 1: Process and it mentions. Flow charts and data dictionaries alongside.
- 12:21Speaker 2: This, Yeah, as related tools. Flow charts help visualize this
- 12:24Speaker 2: sequence of steps and decisions in an algorithm. While data
- 12:28Speaker 2: dictionaries provide a central place to define and describe all
- 12:31Speaker 2: the data elements your system uses, useful for planning and documentation.
- 12:35Speaker 1: So defining a function in Python starts with.
- 12:38Speaker 2: Death deaf function name, parameters, followed by the colon and
- 12:42Speaker 2: the indented block of code that makes up the function's body. Again,
- 12:45Speaker 2: that four S based enden convention is standard, and the
- 12:48Speaker 2: doc string oh very important for documentation. It's a string
- 12:52Speaker 2: literal place right at the beginning of the function body
- 12:55Speaker 2: inside cripple quotes. Usually it explains what the function does,
- 12:58Speaker 2: what its parameters are, what a return, urns, et cetera.
- 13:01Speaker 2: It's not just a comment. Tools can automatically extract this information.
- 13:05Speaker 1: Parameters are in the definition. Arguments are what you pass
- 13:07Speaker 1: when you call it.
- 13:08Speaker 2: Correct parameters are the names used inside the function. Arguments
- 13:13Speaker 2: are the actual value supplied when the function is called.
- 13:17Speaker 2: The book then gets into some powerful argument handling features
- 13:21Speaker 2: ARGs and quarks.
- 13:23Speaker 1: Right for when you don't know how many arguments will be.
- 13:25Speaker 2: Passed Exactlygs inside the function definition collects any extra positional
- 13:30Speaker 2: arguments one's passed just by position into a a tupo okay,
- 13:34Speaker 2: and quary's collects any extra keyword arguments one's past is
- 13:37Speaker 2: name value into a dictionary. You can use them together.
- 13:41Speaker 2: The book highlights this as really useful for library authors
- 13:44Speaker 2: who want to offer flexibility to their users.
- 13:46Speaker 1: And Lambda functions.
- 13:47Speaker 2: Lambdas are for creating small, anonymous functions in line. If
- 13:51Speaker 2: you need a simple function just for one quick use,
- 13:54Speaker 2: maybe as an argument to another function, lambda lets you
- 13:56Speaker 2: define it right there without a full deaf statement.
- 13:59Speaker 1: The book suggest us using the number guessing game as
- 14:01Speaker 1: an exercise for function refactoring.
- 14:04Speaker 2: Yeah, taking a simple script and breaking its logic down
- 14:07Speaker 2: into well defined functions is a great way to practice this.
- 14:09Speaker 1: Structuring functions also introduce the idea of variable scope, where
- 14:13Speaker 1: a variable.
- 14:14Speaker 2: Lives crucial concept. Variables defined right at the top level
- 14:18Speaker 2: of a script outside any function have global scope. They
- 14:22Speaker 2: can in principle be accessed from anywhere.
- 14:25Speaker 1: The variables inside a function.
- 14:28Speaker 2: They have local scope. They only exist and are accessible
- 14:31Speaker 2: within that function. If you have a local variable with
- 14:34Speaker 2: the same name as a global variable, the local one
- 14:37Speaker 2: takes precedence inside the function. They are distinct.
- 14:40Speaker 1: What if you need to change a global variable from
- 14:43Speaker 1: inside a function.
- 14:44Speaker 2: You have to explicitly tell Python that's your intention using
- 14:47Speaker 2: the global keyword global, we will bovar at the start
- 14:50Speaker 2: of the function says when I use my global of
- 14:52Speaker 2: ar here, I mean the global one, not a new
- 14:54Speaker 2: local one.
- 14:54Speaker 1: Okay, and non local. That's where nested functions.
- 14:57Speaker 2: Right. If you define a function inside another one function,
- 15:00Speaker 2: nesting non local is used in the inner function to
- 15:03Speaker 2: refer to a variable in the directly enclosing function scope,
- 15:07Speaker 2: but not the global scope. The example in the book
- 15:10Speaker 2: shows an interfunction modifying a variable belonging to the outer
- 15:13Speaker 2: function using non local.
- 15:14Speaker 1: That clarifies the difference. Now a potentially tricky concept recursion.
- 15:19Speaker 2: Ah recursion a function calling itself. It's a way to
- 15:23Speaker 2: solve problems by breaking them down into smaller, self similar
- 15:27Speaker 2: sub problems.
- 15:28Speaker 1: The key is having an escape patch right. A base
- 15:30Speaker 1: case absolutely essential.
- 15:31Speaker 2: The base case or termination condition is the simplest version
- 15:35Speaker 2: of the problem that the function can solve directly without
- 15:38Speaker 2: calling itself again. This stops the chain of calls. Without it,
- 15:41Speaker 2: you get infinite recursion and eventually a recursion er.
- 15:44Speaker 1: Factorial is the textbook example.
- 15:46Speaker 2: It is factorial n is n factorial n one until
- 15:51Speaker 2: you hit the base case factorial one, which is just
- 15:53Speaker 2: one the book traces how the calls stack up and
- 15:56Speaker 2: then unwind to produce the final result.
- 15:58Speaker 1: How does it stack up against just using a loop iteration?
- 16:01Speaker 2: Recursion can often lead to a very elegant, concise code
- 16:04Speaker 2: that mirrors the mathematical definition of a problem. However, iteration
- 16:09Speaker 2: using loops is generally more efficient in terms of speed
- 16:12Speaker 2: and memory usage in Python and many other languages. The
- 16:15Speaker 2: book does mention that some languages, particularly functional ones, can
- 16:18Speaker 2: optimize tail recursion into iteration, removing the overhead.
- 16:22Speaker 1: Speaking of functional, let's shift to that programming style. How
- 16:25Speaker 1: does the book contrast it with procedural.
- 16:28Speaker 2: It's presented as a different mindset. The core idea in
- 16:31Speaker 2: functional programming is to think about computation more like evaluating
- 16:35Speaker 2: mathematical functions. A key principle is avoiding side effects.
- 16:39Speaker 1: Side effects meaning changes to.
- 16:41Speaker 2: State outside the function itself. A pure functions output depends
- 16:45Speaker 2: only on its input arguments and it doesn't modify anything
- 16:49Speaker 2: external like a global variable or a file. This makes
- 16:52Speaker 2: code easier to reason about and test because you know
- 16:56Speaker 2: exactly what it does based on its inputs alone. This
- 16:59Speaker 2: relates to ref prential transparency.
- 17:01Speaker 1: Which means you can replace the function call with its
- 17:03Speaker 1: result pretty much.
- 17:04Speaker 2: If a function is pure, substituting its call with its
- 17:07Speaker 2: return value for the same inputs won't change the program's
- 17:11Speaker 2: overall behavior. Big win for predictability.
- 17:13Speaker 1: And immutable data is encouraged.
- 17:15Speaker 2: Yes, using data structures that cannot be changed after creation.
- 17:20Speaker 2: Python strings are a good example. When you seem to
- 17:23Speaker 2: modify a string, you're actually creating a new string object.
- 17:27Speaker 2: Working with immutable data helps prevent accidental side effects. Because
- 17:31Speaker 2: functions can't secretly change data that other parts of the
- 17:34Speaker 2: program rely on, they return new data.
- 17:37Speaker 1: Instead, and recursion fits naturally here.
- 17:40Speaker 2: Functional programming often emphasizes recursion as a primary control structure,
- 17:44Speaker 2: fitting the mathematical function model well, though as we said,
- 17:47Speaker 2: iteration is still possible and often more performant in practice
- 17:50Speaker 2: in Python.
- 17:51Speaker 1: What advantages does this style offer, according to.
- 17:54Speaker 2: The book, potential for less code, code that's easier to
- 17:57Speaker 2: understand and test due to purity, easier parallelization since pure
- 18:01Speaker 2: functions don't interfere with each other, and sometimes very elegant
- 18:05Speaker 2: retursive solutions.
- 18:06Speaker 1: Any downsides mentioned.
- 18:07Speaker 2: Things like handling continuous input output or interactive systems can
- 18:11Speaker 2: feel less natural with a purely functional approach. Historically, there
- 18:16Speaker 2: were performance concerns, though that's less true now, and the
- 18:20Speaker 2: style the idioms might feel less intuitive at first if
- 18:23Speaker 2: you're used to procedural or ooprogramming, sometimes perceived as a
- 18:27Speaker 2: bit academic, though functional features are increasingly mainstream.
- 18:31Speaker 1: Got it. This leads into higher order functions. What makes
- 18:34Speaker 1: a function higher order.
- 18:36Speaker 2: It comes from the fact that functions in Python are
- 18:38Speaker 2: first class objects. You can assign them to variables, store
- 18:42Speaker 2: them in data structures, pass them as arguments to other functions,
- 18:45Speaker 2: and return them from functions, just.
- 18:47Speaker 1: Like any other data type like a number or a string.
- 18:50Speaker 2: Exactly. A higher order function is simply a function that
- 18:53Speaker 2: either takes one or more functions as arguments or returns
- 18:57Speaker 2: a function as its result, or both.
- 18:59Speaker 1: Key consop functional programming, very much so.
- 19:02Speaker 2: The book shows examples like passing a calculation function into
- 19:05Speaker 2: another function to tax salary tax funk, or a function
- 19:08Speaker 2: that takes an action function applied data.
- 19:11Speaker 1: Action funk, and functions returning functions that leads to closures.
- 19:15Speaker 2: Yes, when a function defined inside another function an inner
- 19:19Speaker 2: function is returned, it carries with it the environment of
- 19:22Speaker 2: the scope in which it was created. It closes over
- 19:26Speaker 2: any variables that references from.
- 19:27Speaker 1: That outer scope, so it remembers variables from the outer
- 19:31Speaker 1: function even after the outer function has finished.
- 19:34Speaker 2: Precisely, the reset function example in the book with the
- 19:36Speaker 2: inner lambda shows that the return lambda still has access
- 19:40Speaker 2: to the addition variable from reset functions.
- 19:42Speaker 1: Scope and currying related but different.
- 19:45Speaker 2: Related. Currying, named after Haskell curry is a technique where
- 19:49Speaker 2: you take a function that accepts multiple arguments and transform
- 19:52Speaker 2: it into a sequence of functions that each take a
- 19:54Speaker 2: single argument. More practically, in Python, it often means creating
- 19:58Speaker 2: a new function by pre filling or binding some of
- 20:01Speaker 2: the arguments of an existing function.
- 20:03Speaker 1: Like taking multiply ab and creating double multiply.
- 20:06Speaker 2: Two B's essentially yes, yeah, you create a specialized version
- 20:09Speaker 2: by fixing one or more parameters. It's about creating reusable
- 20:13Speaker 2: function variations.
- 20:14Speaker 1: Okay, let's switch gears completely to the other major paradigm,
- 20:18Speaker 1: object oriented programming OP.
- 20:21Speaker 2: Right, a very different way to structure things. The core
- 20:24Speaker 2: idea here is to bundle data called attributes or properties,
- 20:28Speaker 2: and the operations that work on that data called methods,
- 20:31Speaker 2: together into units called classes.
- 20:34Speaker 1: And you work with instances of these classes exactly.
- 20:38Speaker 2: You create objects, which are instances of a class. So
- 20:40Speaker 2: you might have an employee class, and then John and
- 20:42Speaker 2: Jane could be specific employee objects, each with their own name, ID,
- 20:46Speaker 2: et cetera, but sharing the methods defined in the employee class,
- 20:50Speaker 2: like calculate pay.
- 20:51Speaker 1: So design involves identifying these objects.
- 20:54Speaker 2: Yeah, you look at the problem domain and identify the
- 20:57Speaker 2: key entities. What data do they need to store? Their
- 20:59Speaker 2: still eight, what actions can they perform or have performed
- 21:02Speaker 2: on them? Their methods or interface objects then interact by
- 21:06Speaker 2: calling methods on each other sending messages. The pump system
- 21:09Speaker 2: example illustrates how this can create modular systems where obvious
- 21:13Speaker 2: only need to know about their direct collaborators.
- 21:15Speaker 1: Defining a class uses the class keyword in Python.
- 21:17Speaker 2: Simple as class name. Then inside you define attributes and methods.
- 21:22Speaker 1: And creating an object an instance, you call.
- 21:24Speaker 2: The class name as if it were a function. P
- 21:27Speaker 2: one person elis thirty. Now P one is a variable
- 21:32Speaker 2: holding a reference to a person object in memory.
- 21:34Speaker 1: What if I do P two equals P one? Does
- 21:36Speaker 1: that make a copy?
- 21:37Speaker 2: No, that's a crucial point the book makes. It copies
- 21:40Speaker 2: the reference the memory address. P one and P two
- 21:43Speaker 2: now point to the exact same person object. Changing the
- 21:46Speaker 2: object via P one will also be reflected when you
- 21:48Speaker 2: look at it via P two. The ID function can
- 21:51Speaker 2: show they have the same memory id.
- 21:53Speaker 1: If you just print P one you get something cryptic.
- 21:55Speaker 2: Usually yeah. The default is the class name and its
- 21:58Speaker 2: memory address. To get something meaningful, you need to define
- 22:01Speaker 2: a special method called stye self within the class. That
- 22:04Speaker 2: method should return the string representation you want print to use.
- 22:08Speaker 1: Python handles cleaning up these objects automatically.
- 22:10Speaker 2: Yes, that's garbage collection, a huge advantage over language is
- 22:14Speaker 2: like C plus plus where you have to manage memory manually.
- 22:18Speaker 2: Python keeps track of references, and when an object has
- 22:21Speaker 2: no more references pointing to it, it gets automatically cleaned up.
- 22:24Speaker 2: Freeing the memory lets you focus on logic, not memory leaks.
- 22:28Speaker 1: Can attributes belong to the class itself, not just individual objects.
- 22:32Speaker 2: They can. Class attributes are shared by all instances of
- 22:35Speaker 2: the class. Useful for constants related to the class, or
- 22:38Speaker 2: maybe tracking things like how many instances have been created.
- 22:42Speaker 2: Account dot instance count Instance attributes are specific to each object.
- 22:47Speaker 2: My account dot balance.
- 22:48Speaker 1: And those special methods like in it and stray have
- 22:51Speaker 1: double underscores.
- 22:53Speaker 2: Right, and it's a constructor called automatically when you create
- 22:55Speaker 2: an object stave sopra r for printing. There are many
- 22:59Speaker 2: others so cautions. You generally shouldn't name your own methods
- 23:02Speaker 2: like something unless you're intentionally overriding one of Python's built
- 23:05Speaker 2: in behaviors.
- 23:06Speaker 1: Are there methods that work on the class directly.
- 23:08Speaker 2: Yes. Class methods often decorated with at class method and
- 23:12Speaker 2: static methods at static method. They can be called on
- 23:15Speaker 2: the class itself, my class dot class method rather than
- 23:18Speaker 2: an instance. Useful for factory methods. Alternative ways to create
- 23:22Speaker 2: instances or utility functions related to the class.
- 23:25Speaker 1: How do classes connect? Inheritance seems key in OOP.
- 23:29Speaker 2: Inheritance is a cornerstone. It lets you create a new class, subclass,
- 23:33Speaker 2: or child class that inherits properties, attributes, and methods from
- 23:38Speaker 2: an existing class, superclass, or parent class. It promotes code
- 23:42Speaker 2: reuse and establishes is a relationships.
- 23:45Speaker 1: Like a manager is an employee, which is a person.
- 23:47Speaker 2: Perfect example, the manager inherits from employee, gaining its attributes
- 23:51Speaker 2: and methods, and employee inherits from person. The subclass can
- 23:55Speaker 2: use the inherited features directly, it can override them, provide
- 23:58Speaker 2: its own version, and it can add completely new features
- 24:00Speaker 2: of its own.
- 24:01Speaker 1: If a child class needs its own in it, how
- 24:04Speaker 1: does it make sure the parents in it also runs.
- 24:06Speaker 2: The standard way is to call super dot end inside
- 24:10Speaker 2: the child's in it. Super gives you a reference to
- 24:13Speaker 2: the parent class, allowing you to call its methods, including
- 24:17Speaker 2: the constructor. To ensure proper initialization.
- 24:19Speaker 1: And overwriting a method is just redefining it in the
- 24:22Speaker 1: child Yes.
- 24:23Speaker 2: If person has a display method and employee needs a
- 24:26Speaker 2: different display, you just define display again an employee. If
- 24:30Speaker 2: you still need the parents behavior inside the overridden method,
- 24:32Speaker 2: you can call it using super dot display.
- 24:34Speaker 1: The book offers advice on when inheritance is appropriate.
- 24:37Speaker 2: Yeah. It suggests asking does the child really use or
- 24:40Speaker 2: specialize the parent's features? Does the parent's core functionality make
- 24:44Speaker 2: sense in the child's context. The dinghy is a conveyance
- 24:47Speaker 2: example highlights thinking about whether the relationship truly fits the
- 24:51Speaker 2: is model meaningfully.
- 24:53Speaker 1: Python supports inheriting from multiple parents. Multiple inheritance it does.
- 24:57Speaker 2: You can list multiple parent classes slay my class PARENTA
- 25:03Speaker 2: parent B. This can be powerful, but also adds complexity,
- 25:07Speaker 2: particularly regarding which parent's method gets called if both define
- 25:11Speaker 2: a method with the same name. Python has a defined
- 25:14Speaker 2: method resolution order MRO to handle this, but it's something
- 25:17Speaker 2: to be aware of the order you list the parents matters, okay.
- 25:21Speaker 1: Making our custom objects work with standard operators like plus
- 25:24Speaker 1: a that's operator overloading exactly.
- 25:27Speaker 2: It allows you to define how standard operators should behave
- 25:29Speaker 2: when applied to instances of your custom classes. The goal
- 25:32Speaker 2: is to make code using your objects more intuitive and readable.
- 25:35Speaker 1: Like vector one plus vector two instead of vector one dot.
- 25:38Speaker 2: Ad vector Decisely, you achieve this by implementing more of
- 25:41Speaker 2: those special double underscore methods add for plus subframeke mole
- 25:46Speaker 2: for a cup, a q for ltf for eight, and
- 25:48Speaker 2: many others.
- 25:49Speaker 1: And inside adds self other self is the left side,
- 25:52Speaker 1: other is the right.
- 25:53Speaker 2: Correct Inside that method you define what it means to
- 25:55Speaker 2: add other to self. The book shows you can use
- 25:58Speaker 2: is instance other to check the type of other and
- 26:01Speaker 2: potentially handle addition with different types, like adding an integer
- 26:04Speaker 2: to your custom object.
- 26:06Speaker 1: What about properties and decorators like AT property.
- 26:09Speaker 2: Decorators using the AT syntax are a way to modify
- 26:13Speaker 2: or enhance functions or methods in Python. AT property is
- 26:17Speaker 2: a specific built in decorator that lets you define a
- 26:20Speaker 2: method but access it as if it were a simple attribute, So.
- 26:23Speaker 1: My object dot value might actually call a method behind
- 26:26Speaker 1: the scenes exactly.
- 26:27Speaker 2: It's often used to create getters. You can put logic
- 26:30Speaker 2: inside the method, maybe calculate the value on the fly,
- 26:33Speaker 2: or check permissions whenever someone accesses my object dot value.
- 26:36Speaker 1: Can you control assignment too, Like my object dot value
- 26:39Speaker 1: equals ten.
- 26:40Speaker 2: Yes. Using me at property name dot setter decorator, you
- 26:43Speaker 2: define another method decorated with at value dot setter properties value,
- 26:47Speaker 2: and that method will be called whenever someone tries to
- 26:49Speaker 2: assign to my object dot value. Great for validation or
- 26:52Speaker 2: triggering actions on.
- 26:53Speaker 1: Change and at delet for delay.
- 26:56Speaker 2: Right at value dot deleter defines the method called the
- 27:00Speaker 2: end of myobject dot value is executed. The book often
- 27:03Speaker 2: shows these us with a private backing attribute like value,
- 27:07Speaker 2: with a single underscore to store the actual data, enforcing
- 27:10Speaker 2: access through the property methods for encapsulation.
- 27:13Speaker 1: Moving into more advanced concepts, protocols, polymorphism descriptors. What's the
- 27:18Speaker 1: idea of a protocol? In Python?
- 27:20Speaker 2: A protocol is like an informal interface. It's not something
- 27:23Speaker 2: you formally declare. It's defined by the expected methods in behavior.
- 27:27Speaker 2: If an object has the necessary methods like itter and
- 27:31Speaker 2: next for the iteration protocol, it's considered to adhere to
- 27:34Speaker 2: that protocol, regardless of his actual class or inheritance.
- 27:37Speaker 1: This sounds like duck typing.
- 27:39Speaker 2: It's the heart of duck typing. If it walks like
- 27:41Speaker 2: a duck and quacks like a duck, then it must
- 27:43Speaker 2: be a duck. Python often cares more about whether an
- 27:46Speaker 2: object can do what's needed, does it have the right methods,
- 27:49Speaker 2: rather than what its specific type is.
- 27:51Speaker 1: And polymorphism flows from this.
- 27:53Speaker 2: Yes, polymorphism means many forms. It's the ability for different
- 27:57Speaker 2: objects potentially of different types, maybe not even related by inheritance,
- 28:02Speaker 2: but adhering to the same protocol to respond to the
- 28:04Speaker 2: same message the same method call in their own specific way.
- 28:08Speaker 2: Len works on strings, lists, dictionaries because they all implement
- 28:12Speaker 2: the len method part of the size protocol, but how
- 28:15Speaker 2: they calculate their length differs.
- 28:17Speaker 1: The context manager protocol enables the with statement exactly.
- 28:20Speaker 2: Any object with enter and exit methods supports the context
- 28:24Speaker 2: manager protocol. The width object is variable. Statement automatically calls
- 28:28Speaker 2: object dot enter the start. It's return value goes into
- 28:31Speaker 2: variable and guarantees object dot exit is called at the end.
- 28:34Speaker 2: Even if errors occur within the width block. Essential for
- 28:37Speaker 2: resource management like files or network connections.
- 28:40Speaker 1: And descriptors. They sound complex, they.
- 28:42Speaker 2: Are a more advanced mechanism. A descriptor is an object
- 28:46Speaker 2: attributed to a class that defines special behavior when that
- 28:49Speaker 2: attribute is accessed on an instance. They control access using
- 28:53Speaker 2: methods like get, set, and delete defined on the descript
- 28:56Speaker 2: object itself. Properties are actually implemented using descriptors. The book
- 29:00Speaker 2: also mentions related attribute access methods. Get it is called
- 29:04Speaker 2: only as a last resort if an attribute isn't found
- 29:06Speaker 2: through normal means. Get attribute is called for every attribute
- 29:10Speaker 2: access use with extreme care to avoid infinite recursion, and
- 29:14Speaker 2: set attry is called for every attribute assignment.
- 29:16Speaker 1: Okay, let's dive deep into iteration, iterables, iterators, generators, quarantines.
- 29:22Speaker 2: What's the difference, okay and itterable is anything you could
- 29:24Speaker 2: loop over with a for loop. Think lists, strains, dictionaries.
- 29:28Speaker 2: The key requirement is that it must have an itter method.
- 29:30Speaker 2: An gives you an iterator. The iterator is the object
- 29:33Speaker 2: that actually keeps track of the position and produces the
- 29:36Speaker 2: next value. It must have a next method that returns
- 29:39Speaker 2: the next item and raises a stop iteration exception. When
- 29:42Speaker 2: there are no more items. Iterators usually also have an
- 29:44Speaker 2: inter method that just returns self.
- 29:46Speaker 1: So four loops work by getting an iterator from the
- 29:49Speaker 1: iterable then calling next on it repeatedly exactly.
- 29:53Speaker 2: The inner tool's module in Python provides lots of pre
- 29:56Speaker 2: built efficient iterators.
- 29:57Speaker 1: Where do generators fit int.
- 30:00Speaker 2: Are a super convenient way to create iterators. Instead of
- 30:03Speaker 2: writing a full class with iter and next, you write
- 30:06Speaker 2: a function that uses.
- 30:07Speaker 1: The yield keyword yield instead of return.
- 30:10Speaker 2: Right when you call a generator function, it doesn't run immediately.
- 30:13Speaker 2: It returns a special generator object, which is an iterator.
- 30:16Speaker 2: Each time you call next on the generator object or
- 30:19Speaker 2: use it in a for loop, the function's code runs
- 30:22Speaker 2: until it hits a yield statement. It sends the yielded
- 30:25Speaker 2: value back, and then pauses its execution right there, preserving its.
- 30:29Speaker 1: Local state lazy evaluation exactly.
- 30:32Speaker 2: It only generates the next value when asked. This is
- 30:35Speaker 2: incredibly memory efficient for large sequences or even infinite ones,
- 30:38Speaker 2: because you don't store everything in memory at once. The
- 30:41Speaker 2: even subto example in the book likely demonstrates this.
- 30:44Speaker 1: Okay, so generators yield values out. How are courotines different.
- 30:48Speaker 2: Core routines are like advanced generators. They can also yield
- 30:52Speaker 2: a pause, but the key difference is they can also
- 30:54Speaker 2: receive value sent into them. Well paused yield can act
- 30:59Speaker 2: as an expression that sieves of value passed via the
- 31:02Speaker 2: send method, so they become little processing units you can
- 31:05Speaker 2: push data into. They often need to be primed first,
- 31:09Speaker 2: calling next or send none to run up to the
- 31:12Speaker 2: first yield before you can send data. The book mentions
- 31:15Speaker 2: a rep example suggesting a coroutine that receives lines of
- 31:18Speaker 2: text and processes them. They also have ways to handle being.
- 31:21Speaker 1: Closed fascinating distinction. Let's quickly run through Python's main built
- 31:25Speaker 1: in collections sure.
- 31:26Speaker 2: The four work horses mentioned are lists, tuples, sets.
- 31:30Speaker 1: And dictionaries check mutable, sequence.
- 31:32Speaker 2: Ordered, unchangeable, allow duplicates, parentheses.
- 31:35Speaker 1: Check immutable sequence.
- 31:36Speaker 2: Ordered unchangeable, n duplicates, curly braces.
- 31:40Speaker 1: Test stuck mutable collection of unique items great for membership testing, dictionaries,
- 31:45Speaker 1: unordered mostly ordered since three point seven, key value pairs,
- 31:50Speaker 1: n duplicate keys, curly braces que check.
- 31:54Speaker 2: Key based lookup mapping keys to values conceptually based on
- 31:58Speaker 2: hash tables for efficiency. The book also points to the
- 32:01Speaker 2: collections module for more specialized types. Like counter recounting things,
- 32:05Speaker 2: and order addict if you need guaranteed insertion order.
- 32:08Speaker 1: The guide also touches on abstract data types ADTs like
- 32:11Speaker 1: queues and stacks.
- 32:12Speaker 2: Right ADTs are more about the concept the behavior rather
- 32:16Speaker 2: than a specific implementation.
- 32:17Speaker 1: Que first in, first out FIFO like a line.
- 32:20Speaker 2: YEP, add to the back, remove from the front, order preserved.
- 32:24Speaker 1: Stack last in first out LIFO like plates add to the.
- 32:28Speaker 2: Top, removed from the top, order also preserved. The book
- 32:31Speaker 2: shows how you can use Python lists to mimic thesele's
- 32:33Speaker 2: a penpop for a stack, a pen pop a queue,
- 32:36Speaker 2: but notes pop is inefficient for lists. It then provides
- 32:39Speaker 2: proper Q and stack class examples using an internal list
- 32:42Speaker 2: but exposing the correct ADT methods on key toq or push.
- 32:45Speaker 1: Pop Circling back to functionalideas, dot map and filter two.
- 32:49Speaker 2: Very useful higher order functions for working with iterables. Filter
- 32:53Speaker 2: function iterable takes a function that returns true or false.
- 32:57Speaker 2: It applies this test to every item in the iterable
- 32:59Speaker 2: and gives you back an iterator containing only the items
- 33:02Speaker 2: for which the function returned true.
- 33:03Speaker 1: Good for selecting data exactly.
- 33:05Speaker 2: And map function iterable one applies a given function to
- 33:09Speaker 2: every item in the iterable or corresponding items if you
- 33:11Speaker 2: pass multiple itterables and returns an iterator of the results.
- 33:15Speaker 2: Good for transforming data precisely applying an operation across a
- 33:19Speaker 2: whole collection. The examples likely show things like squaring every
- 33:23Speaker 2: number in a list or extracting a specific piece of
- 33:25Speaker 2: data from a list of objects.
- 33:27Speaker 1: Powerful tools for data manipulation in a functional style.
- 33:31Speaker 2: Definitely encourages thinking about operations on collections as transformations rather
- 33:35Speaker 2: than modifying things in place.
- 33:36Speaker 1: Lastly, the book mentions a tic tac toe example as
- 33:39Speaker 1: a way to tie things together.
- 33:41Speaker 2: Yeah, it's presented as a mini case study. It likely
- 33:44Speaker 2: shows how concepts like classes board player, game inheritance, human player,
- 33:50Speaker 2: computer player inheriting from player data structures, maybe a list
- 33:54Speaker 2: of lists for the board and methods all combined to
- 33:57Speaker 2: build a recognizable application and administrates putting the pieces into practice.
- 34:01Speaker 1: Wow. Okay, that was quite the journey through this beginner's guide.
- 34:05Speaker 1: We really covered the spectrum. Started with the basics Python's
- 34:08Speaker 1: dynamic nature setting up.
- 34:10Speaker 2: Right, Then the fundamental building blocks data types like strings, number, booleans, none,
- 34:16Speaker 2: control flow using if lf else, and loops like while
- 34:20Speaker 2: and four, and the critical role of indentation.
- 34:22Speaker 1: Instruction code with functions, understanding parameters, arguments, arcs, quarks, scope, rules, global,
- 34:28Speaker 1: non local, and even recursion.
- 34:30Speaker 2: We explored different philosophies to the functional approach, with its
- 34:33Speaker 2: focus on pure functions, immutability, referential transparency, and tools like
- 34:38Speaker 2: higher order functions, closures and currying.
- 34:40Speaker 1: And contrasted that with object orientation classes, objects, attributes, methods,
- 34:45Speaker 1: the power of inheritance, operator overlooting for natural syntax, and
- 34:50Speaker 1: niceties like properties and decorators.
- 34:52Speaker 2: We touched on some deeper Python mechanics too, like protocols
- 34:55Speaker 2: enabling duct typing and polymorphism, context managers for reliable resource
- 35:00Speaker 2: handling with descriptions behind the scenes, and the nuances of attribute.
- 35:04Speaker 1: Access methods, plus advanced iteration patterns iterables giving iterators, the
- 35:09Speaker 1: memory efficiency of generators using yield, and the data receiving
- 35:12Speaker 1: capabilities of corotines, and of.
- 35:14Speaker 2: Course Python's core collections lists, tuples, sets, dictionaries, along with
- 35:19Speaker 2: conceptual ADTs like queues and stacks, and functional hopers like
- 35:22Speaker 2: map and filter.
- 35:23Speaker 1: It feels like this deep dive really extracted the essence
- 35:26Speaker 1: from that guide, laying out a roadmap from basic syntax
- 35:29Speaker 1: to some pretty sophisticated concepts needed to really get good
- 35:32Speaker 1: at Python.
- 35:33Speaker 2: Yeah, it covers a lot of ground necessary to move
- 35:35Speaker 2: from beginner to experience developer.
- 35:37Speaker 1: Reflecting on all of this from the simplest variable assignment
- 35:40Speaker 1: right up to complex things like metaclasses implicitly enabling descriptors,
- 35:44Speaker 1: or choosing between recursion and iteration, or deciding between a
- 35:47Speaker 1: functional or object oriented design. Python gives you so many tools,
- 35:52Speaker 1: so many ways to think. It really makes you wonder,
- 35:54Speaker 1: doesn't it. As you gain experience, how do you actually
- 35:56Speaker 1: choose when faced with a new problem? How do you
- 35:59Speaker 1: navigate this rich landscape and select the most effective, the
- 36:02Speaker 1: most elegant, the most pythonic approach from all these possibilities