In the sixth lesson of the Python Programming Basics series, we cover functions – def, parameters and arguments, the return value, default parameter values, keyword arguments, and variable scope (local vs. global). We'll cover two common mistakes – a forgotten return and swapped positional arguments – and a docstring for documenting a function. This lesson builds on Lesson 5 and is designed for absolute beginners.
In the next lesson, we'll cover strings in depth – text methods, f-strings, and slicing.
New lessons come out every Sunday.
#PythonForBeginners