From the course: Secure Coding in Python (2020)
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Dynamic typing with Python - Python Tutorial
From the course: Secure Coding in Python (2020)
Dynamic typing with Python
- [Instructor] Python's Dynamic Type system is one of the many reasons for it's growing popularity. However, as the saying goes, there is no such thing as a free lunch. What do I mean by that? Well, using dynamic types can increase our productivity by reducing boilerplate and it can produce some very clean looking code. However, we should proceed with caution, especially when dealing with what's often referred to Truthy and Falsy values. Truthy and Falsy values are non-Boolean values that will be coerced into true and false by the Python interpreter. This will happen if we check them implicitly. Examples of truthy values are non-empty strings and populated lists, whereas falsy values include empty lists and empty strings, even the number zero. So how does all this relate to security? In order to find out, we should head over to some code. So here I am at my exercise files at 02 02 01 begin, and here we are in a file…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.