Python

PyCon Africa Day 1

Thursday August 9 2019 was the second day of PyCon Africa in Accra. About 17 talks were delivered, including two keynotes. Below you’ll find a quick summary of the talks I attended. The pictures in the post aren’t great because they were either taken from a bad angle or using a smartphone. I’ll update this […]

PyCon Africa Day 1 Read More »

Python hasattr() Function

A useful built in function in Python is hasattr(). This function is used to test if an object has some attribute. hasattr() returns True if the object you specify contains a particular attribute and False if it does not. hasattr() syntax: hasattr() takes two parameters: object. The object whose attribute you want to check attribute.

Python hasattr() Function Read More »

Working With Files in Python

Have you ever wondered how you can use Python to work with groups of files? I wrote a comprehensive article on this for Real Python. You can find the article here. In the article, I cover differences between modules such as fnmatch, pathlib and os. In addition to that, you will learn how to create,

Working With Files in Python Read More »

*args and **kwargs explained.

If you have ever felt confused when you came across code that contains *args and **kwargs as function parameters, you’re not alone. This syntax is used specify that a function can be called with any number of arguments and It can be very confusing at first. In this article, I explain what *args and **kwargs

*args and **kwargs explained. Read More »