String Manipulation part 2: Regular Expressions

Regular Expressions in Python Regular Expressions (also known as REs, regexes or regex patterns) are a small and highly specialised programming language used to search for patterns in text strings. Regular Expressions allow you to specify patterns or rules that you want to match in a string. The patterns you define can be for matching: … 

 

String manipulation in Python.

Strings are one of the most fundamental data types. Strings in Python can be expressed in a number of ways. The most common way to create a new string is to enclose text in single or double quotes. Strings in Python are immutable, which means that they cannot be modified once they are created. That … 

 

Python command line interfaces: An overview of argparse.

Command-line or console applications are programs that are designed to be used via a text only interface such as the terminal. Command-line programs accept instructions or commands from their users in the form of flags or switches. Popular command-line applications include: git – A version control system Vim – A text editor and Grep – … 

 

Top 8 resources for Python beginners

Python is a popular, easy to learn programming language that is great option for beginners. There are a ton of good resources available online to get you started in learning Python programming. Because of this, It can be difficult for someone new to Python to know where to start or what books or courses to … 

 

An overview of the enumerate() function

According to the Python documentation, the enumerate function is a built in function that returns an enumerate object. Another popular article on the subject describes it as a function that allows you to “generate iterator element along with index”. I find these two definitions unclear. Here’s an explanation that makes more sense: the enumerate function … 

 

PyCon Zimbabwe 2017

PyCon Zim 2017 I had the priviledge of attending PyCon Zimbabwe two weeks ago. This was my very first language conference. PyCon is a conference for the Python programming community. In Zimbabwe, it was held from the 23rd to the 26th of August 2017. This year’s PyCon was the second one in Zimbabwe and its … 

 

How to send desktop notifications in Linux.

Desktop notifications are used to inform the user about an event or display some form of information without getting in the user’s way. Notifications are usually small pop up windows that disappear after a short while. There are a number of ways to display notifications using Python, but most of these depend on some GUI … 

 

Working with CSV files in Python

A common file format used to store data is the .csv file. The ‘csv’ in the name stands for “Comma Separated Values”. CSV files are very similar to Excel spreadsheets in that the data theiris arranged in rows and columns. Excel files are written in binary format whereas csv files are simple text files that … 

 

Virtual environments in Python

In Python, a virtual environment is way of isolating a working copy of Python to test software or to install new packages without affecting existing packages. virtualenv is a tool used to create isolated Python environments. virtualenv is a useful tool for creating sandboxes or for installing packages locally without system administrator access and also …