Python tutorials

Python Basics: Scopes

On your Python journey, you’ve probably learned about functions and loops. To fully understand functions and loops in Python, you need to be familiar with the issue of scope. By the end of this video course, you’ll know: What a scope is and why it’s important How Python applies the LEGB rule for scope resolution Scope can be one of the more difficult programming concepts to understand, so in this video course, you’ll get a gentle introduction to it. This […]

Read more

Python’s doctest: Document and Test Your Code at Once

Are you interested in writing usage examples for your code that work as documentation and test cases simultaneously? If your answer is yes, then Python’s doctest module is for you. This module provides a testing framework that doesn’t have too steep a learning curve. It’ll allow you to use code examples for two purposes: documenting and testing your code. Apart from allowing you to use your code’s documentation for testing the code itself, doctest will help you keep your code […]

Read more

My “Aha Moment” About Python

I’ve been programming for about 20 years now, and my “aha moment” with python came to me last night. It was a pretty simple one — I started with Python 2 because that’s what we’re using at work (and it was free). But after some trial and error, I figured out how to get started quickly with Python 3.

Read more
1 88 89 90 91 92 207