Python Course – 5. Functions
Learn Python functions: arguments and parameters, scope, documenting your code and lambda functions, with theory, videos and a hands-on ATM exercise.
Code
Inside articles there are more settings: width, font size, series position and code.
Saved in this browser.
Learn Python functions: arguments and parameters, scope, documenting your code and lambda functions, with theory, videos and a hands-on ATM exercise.
Learn how to use and create Python packages and modules, install third-party libraries with PIP, and work with Random, Math and Datetime, with exercises.
Learn how Python exceptions work: how to catch them, which ones to handle and which to let through, with video lessons, theory and hands-on exercises.
Learn how to work with files and directories in Python: paths, reading and writing files, plus practical exercises with video lessons and downloadable theory.
Python generators let you stream data in real time and get each item only when it's consumed. A great balance between processing and memory. Learn them here.
Return in Python means "we're done". Functions with: Return and one value, Return and several values, Return None, Return void, No Return, and more.
Learn how to build your own dictionary-like classes in Python with Mapping and MutableMapping: magic methods, lifecycle, repr, str and a full working example.
Mapping, Sequence or Collection in Python: you choose the best one for the data structure you want to build. A simple explanation of everything you need.
In Python Views, if you change something in the underlying dictionary (a value or a key), the change is reflected inside the Views. Learn how they work.
Understand repr vs str in Python and learn how to use them in any custom class. Examples of using repr for debugging.
A hashable is any object that returns its "Hash Code" when asked, and that code stays the same for the whole life of the object. Learn how it works in Python.
Learn whether a variable can change (mutable) or not (immutable). Mutable: List, Dict, Set. Immutable: String, Int, Float, Bool, Tuple, Range, Decimal.