Defining Python Functions With Optional Arguments (Overview)
Defining your own functions is an essential skill for writing clean and effective code. In this course, you’ll explore the techniques you have available for defining Python functions that take optional arguments. When you master Python optional arguments, you’ll be able to define functions that are more powerful and more flexible.
In this course, you’ll learn how to:
- Distinguish between parameters and arguments
- Define functions with optional arguments and default parameter values
- Define functions using
args
andkwargs
- Deal with error messages about optional arguments
For more information on concepts covered in this lesson, you can check out Defining Your Own Python Function.
00:00 Using Python Optional Arguments When Defining Functions.
00:05 Defining your own functions is an essential skill for writing clean and effective code. In this course, you will explore the techniques you have available for defining Python functions that take optional arguments. When you master Python optional arguments, you’ll be able to define functions that are more powerful and more flexible.
00:26 In this course, you’ll learn what the difference is between parameters and arguments, how to define functions with optional arguments and default parameter values, how to define functions using args and kwargs, and how to deal with error messages about optional arguments.
00:46 To get the most out of this course, you’ll need some familiarity with defining functions with required arguments. So if that’s something you feel you need to work on, check out this Real Python tutorial. Now you know what’s going to be covered, let’s get started.
Become a Member to join the conversation.